diff --git a/compiler/rustc_session/src/config/cfg.rs b/compiler/rustc_session/src/config/cfg.rs index 84a26af6b54..12ac666574f 100644 --- a/compiler/rustc_session/src/config/cfg.rs +++ b/compiler/rustc_session/src/config/cfg.rs @@ -315,6 +315,11 @@ macro_rules! ins_sym { ins_none!(sym::target_thread_local); } + if sess.target.vendor_symbol().as_str() == "alpine" { + ins_none!(sym::libc_unstable_musl_v1_2); // 0.2.190+ + ins_none!(sym::libc_unstable_musl_v1_2_3); // 0.2.187-0.2.189 + } + ins_sym!(sym::target_vendor, sess.target.vendor_symbol()); // If the user wants a test runner, then add the test cfg. diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index e533458ab53..ee4276ad332 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1194,6 +1194,8 @@ lhs, lib, libc, + libc_unstable_musl_v1_2, + libc_unstable_musl_v1_2_3, lifetime, lifetime_capture_rules_2024, lifetimes,