add a rustbuild cargo feature for integration with rust-lang/rust
This commit is contained in:
parent
c56faf22ab
commit
4bf128a84c
9
build.rs
9
build.rs
|
@ -407,8 +407,15 @@ fn main() {
|
||||||
sources.remove(&["aeabi_cdcmp", "aeabi_cfcmp"]);
|
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() {
|
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);
|
cfg.file(&src);
|
||||||
println!("cargo:rerun-if-changed={}", src.display());
|
println!("cargo:rerun-if-changed={}", src.display());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue