add a rustbuild cargo feature for integration with rust-lang/rust
This commit is contained in:
parent
0537fcfd76
commit
8692e64db9
1 changed files with 8 additions and 1 deletions
|
|
@ -407,8 +407,15 @@ fn main() {
|
|||
sources.remove(&["aeabi_cdcmp", "aeabi_cfcmp"]);
|
||||
}
|
||||
|
||||
let root = if env::var_os("CARGO_FEATURE_RUSTBUILD").is_some() {
|
||||
Path::new("../../libcompiler_builtins")
|
||||
} else {
|
||||
Path::new(".")
|
||||
};
|
||||
|
||||
let src_dir = root.join("compiler-rt/compiler-rt-cdylib/compiler-rt/lib/builtins");
|
||||
for src in sources.map.values() {
|
||||
let src = Path::new("compiler-rt/compiler-rt-cdylib/compiler-rt/lib/builtins").join(src);
|
||||
let src = src_dir.join(src);
|
||||
cfg.file(&src);
|
||||
println!("cargo:rerun-if-changed={}", src.display());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue