Skip to content

Commit

Permalink
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros
Browse files Browse the repository at this point in the history
  • Loading branch information
clubby789 committed Dec 29, 2024
1 parent f4d215e commit f073462
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bootstrap/src/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ use shared_helpers::{
#[path = "../utils/shared_helpers.rs"]
mod shared_helpers;

#[path = "../utils/proc_macro_deps.rs"]
mod proc_macro_deps;

fn main() {
let orig_args = env::args_os().skip(1).collect::<Vec<_>>();
let mut args = orig_args.clone();
Expand Down Expand Up @@ -167,7 +170,7 @@ fn main() {
// issue https://github.com/rust-lang/rust/issues/100530
if env::var("RUSTC_TLS_MODEL_INITIAL_EXEC").is_ok()
&& crate_type != Some("proc-macro")
&& !matches!(crate_name, Some("proc_macro2" | "quote" | "syn" | "synstructure"))
&& proc_macro_deps::CRATES.binary_search(&crate_name.unwrap_or_default()).is_err()
{
cmd.arg("-Ztls-model=initial-exec");
}
Expand Down

0 comments on commit f073462

Please sign in to comment.