Make rust build pass LLVM_RUSTLLVM to C++ compiler
This commit is contained in:
parent
ce50bedd8c
commit
fc210a8994
2 changed files with 8 additions and 0 deletions
|
|
@ -199,6 +199,10 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
|
|||
if !build.unstable_features {
|
||||
cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1");
|
||||
}
|
||||
// Flag that rust llvm is in use
|
||||
if build.config.target_config.get(target).is_none() {
|
||||
cargo.env("LLVM_RUSTLLVM", "1");
|
||||
}
|
||||
cargo.env("LLVM_CONFIG", build.llvm_config(target));
|
||||
if build.config.llvm_static_stdcpp {
|
||||
cargo.env("LLVM_STATIC_STDCPP",
|
||||
|
|
|
|||
|
|
@ -112,6 +112,10 @@ fn main() {
|
|||
cfg.flag(&flag);
|
||||
}
|
||||
|
||||
if env::var_os("LLVM_RUSTLLVM").is_some() {
|
||||
cfg.flag("-DLLVM_RUSTLLVM");
|
||||
}
|
||||
|
||||
cfg.file("../rustllvm/ExecutionEngineWrapper.cpp")
|
||||
.file("../rustllvm/PassWrapper.cpp")
|
||||
.file("../rustllvm/RustWrapper.cpp")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue