diff options
Diffstat (limited to 'library/profiler_builtins')
-rw-r--r-- | library/profiler_builtins/build.rs | 6 | ||||
-rw-r--r-- | library/profiler_builtins/src/lib.rs | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/library/profiler_builtins/build.rs b/library/profiler_builtins/build.rs index 1b1f11798..d14d0b822 100644 --- a/library/profiler_builtins/build.rs +++ b/library/profiler_builtins/build.rs @@ -6,6 +6,12 @@ use std::env; use std::path::Path; fn main() { + println!("cargo:rerun-if-env-changed=LLVM_PROFILER_RT_LIB"); + if let Ok(rt) = env::var("LLVM_PROFILER_RT_LIB") { + println!("cargo:rustc-link-lib=static:+verbatim={rt}"); + return; + } + let target = env::var("TARGET").expect("TARGET was not set"); let cfg = &mut cc::Build::new(); diff --git a/library/profiler_builtins/src/lib.rs b/library/profiler_builtins/src/lib.rs index 0c83bcee0..a81d0a635 100644 --- a/library/profiler_builtins/src/lib.rs +++ b/library/profiler_builtins/src/lib.rs @@ -7,4 +7,5 @@ issue = "none" )] #![allow(unused_features)] +#![cfg_attr(not(bootstrap), allow(internal_features))] #![feature(staged_api)] |