Skip to content

Commit

Permalink
Improved checking of target's llvm_config
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bitshifter committed Aug 10, 2016
1 parent cbb88fa commit 05045da
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1");
}
// Flag that rust llvm is in use
if build.config.target_config.get(target).is_none() {
if build.is_rust_llvm(target) {
cargo.env("LLVM_RUSTLLVM", "1");
}
cargo.env("LLVM_CONFIG", build.llvm_config(target));
Expand Down
10 changes: 10 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,16 @@ impl Build {
self.out.join(target).join("llvm")
}

/// Returns true if no custom `llvm-config` is set for the specified target.
///
/// If no custom `llvm-config` was specified then Rust's llvm will be used.
fn is_rust_llvm(&self, target: &str) -> bool {
match self.config.target_config.get(target) {
Some(ref c) => c.llvm_config.is_none(),
None => true
}
}

/// Returns the path to `llvm-config` for the specified target.
///
/// If a custom `llvm-config` was specified for target then that's returned
Expand Down
2 changes: 1 addition & 1 deletion src/llvm
Submodule llvm updated 0 files
2 changes: 1 addition & 1 deletion src/rustllvm/llvm-auto-clean-trigger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
# The actual contents of this file do not matter, but to trigger a change on the
# build bots then the contents should be changed so git updates the mtime.
2016-07-25b
2016-08-07

0 comments on commit 05045da

Please sign in to comment.