diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 76081833e05eb..e9271addb96f5 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -270,6 +270,7 @@ #![feature(allow_internal_unsafe)] #![feature(allow_internal_unstable)] #![feature(c_unwind)] +#![cfg_attr(not(bootstrap), feature(cfg_sanitizer_cfi))] #![feature(cfg_target_thread_local)] #![feature(cfi_encoding)] #![feature(concat_idents)] diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs index ac85531c372ea..58f7ab84101ae 100644 --- a/library/std/src/sys/unix/thread_local_dtor.rs +++ b/library/std/src/sys/unix/thread_local_dtor.rs @@ -11,7 +11,7 @@ // Note, however, that we run on lots older linuxes, as well as cross // compiling from a newer linux to an older linux, so we also have a // fallback implementation to use as well. -#[allow(unexpected_cfgs)] +#[cfg_attr(bootstrap, allow(unexpected_cfgs))] #[cfg(any( target_os = "linux", target_os = "android",