Skip to content

Commit 53d58db

Browse files
luca-barbieriMark-Simulacrum
authored andcommitted
Require compiler-rt root at ../src/llvm-project/compiler-rt
1 parent ac2b84f commit 53d58db

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/bootstrap/compile.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ pub fn std_cargo(builder: &Builder<'_>, target: Interned<String>, cargo: &mut Ca
186186
// `compiler-rt` is located.
187187
let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
188188
let compiler_builtins_c_feature = if compiler_builtins_root.exists() {
189+
// Note that `libprofiler_builtins/build.rs` also computes this so if
190+
// you're changing something here please also change that.
189191
cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root);
190192
" compiler-builtins-c".to_string()
191193
} else {

src/libprofiler_builtins/build.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ fn main() {
6363
cfg.define("COMPILER_RT_HAS_ATOMICS", Some("1"));
6464
}
6565

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

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

0 commit comments

Comments
 (0)