Skip to content

Commit 05045da

Browse files
committed
Improved checking of target's llvm_config
Point llvm @bitshifter branch until PR accepted Use today's date for LLVM auto clean trigger Update LLVM submodule to point at rust-lang fork. Handle case when target is set
1 parent cbb88fa commit 05045da

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

src/bootstrap/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
199199
cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1");
200200
}
201201
// Flag that rust llvm is in use
202-
if build.config.target_config.get(target).is_none() {
202+
if build.is_rust_llvm(target) {
203203
cargo.env("LLVM_RUSTLLVM", "1");
204204
}
205205
cargo.env("LLVM_CONFIG", build.llvm_config(target));

src/bootstrap/lib.rs

+10
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,16 @@ impl Build {
727727
self.out.join(target).join("llvm")
728728
}
729729

730+
/// Returns true if no custom `llvm-config` is set for the specified target.
731+
///
732+
/// If no custom `llvm-config` was specified then Rust's llvm will be used.
733+
fn is_rust_llvm(&self, target: &str) -> bool {
734+
match self.config.target_config.get(target) {
735+
Some(ref c) => c.llvm_config.is_none(),
736+
None => true
737+
}
738+
}
739+
730740
/// Returns the path to `llvm-config` for the specified target.
731741
///
732742
/// If a custom `llvm-config` was specified for target then that's returned

src/llvm

Submodule llvm updated from d295833 to 786aad1

src/rustllvm/llvm-auto-clean-trigger

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2016-07-25b
4+
2016-08-07

0 commit comments

Comments
 (0)