Skip to content

Commit

Permalink
Require compiler-rt root at ../src/llvm-project/compiler-rt
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-barbieri authored and Mark-Simulacrum committed Apr 11, 2020
1 parent ac2b84f commit 53d58db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/bootstrap/compile.rs
Expand Up @@ -186,6 +186,8 @@ pub fn std_cargo(builder: &Builder<'_>, target: Interned<String>, cargo: &mut Ca
// `compiler-rt` is located.
let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
let compiler_builtins_c_feature = if compiler_builtins_root.exists() {
// Note that `libprofiler_builtins/build.rs` also computes this so if
// you're changing something here please also change that.
cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root);
" compiler-builtins-c".to_string()
} else {
Expand Down
5 changes: 3 additions & 2 deletions src/libprofiler_builtins/build.rs
Expand Up @@ -63,8 +63,9 @@ fn main() {
cfg.define("COMPILER_RT_HAS_ATOMICS", Some("1"));
}

let root = env::var_os("RUST_COMPILER_RT_ROOT").unwrap();
let root = Path::new(&root);
// Note that this should exist if we're going to run (otherwise we just
// don't build profiler builtins at all).
let root = Path::new("../llvm-project/compiler-rt");

let src_root = root.join("lib").join("profile");
for src in profile_sources {
Expand Down

0 comments on commit 53d58db

Please sign in to comment.