pub rust_optimize_tests: bool,
pub rust_dist_src: bool,
pub rust_codegen_backends: Vec<Interned<String>>,
- pub rust_codegen_backends_dir: String,
pub rust_verify_llvm_ir: bool,
pub rust_remap_debuginfo: bool,
dist_src: Option<bool>,
save_toolstates: Option<String>,
codegen_backends: Option<Vec<String>>,
- codegen_backends_dir: Option<String>,
lld: Option<bool>,
llvm_tools: Option<bool>,
lldb: Option<bool>,
config.ignore_git = false;
config.rust_dist_src = true;
config.rust_codegen_backends = vec![INTERNER.intern_str("llvm")];
- config.rust_codegen_backends_dir = "codegen-backends".to_owned();
config.deny_warnings = true;
config.missing_tools = false;
.collect();
}
- set(&mut config.rust_codegen_backends_dir, rust.codegen_backends_dir.clone());
-
config.rust_codegen_units = rust.codegen_units.map(threads_from_config);
config.rust_codegen_units_std = rust.codegen_units_std.map(threads_from_config);
}
config
}
+ /// Try to find the relative path of `bindir`, otherwise return it in full.
+ pub fn bindir_relative(&self) -> &Path {
+ let bindir = &self.bindir;
+ if bindir.is_absolute() {
+ // Try to make it relative to the prefix.
+ if let Some(prefix) = &self.prefix {
+ if let Ok(stripped) = bindir.strip_prefix(prefix) {
+ return stripped;
+ }
+ }
+ }
+ bindir
+ }
+
/// Try to find the relative path of `libdir`.
pub fn libdir_relative(&self) -> Option<&Path> {
let libdir = self.libdir.as_ref()?;