diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2024-12-28 23:31:16 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-12-29 21:48:06 +0000 |
| commit | f0734626cd177b7719b9b1d13edff2c9bab4b341 (patch) | |
| tree | 1f0e51344682abaa95a7500ea24046c62bf48d08 /src | |
| parent | f4d215ea91e233d5208d687548222183d4d279d8 (diff) | |
| download | rust-f0734626cd177b7719b9b1d13edff2c9bab4b341.tar.gz rust-f0734626cd177b7719b9b1d13edff2c9bab4b341.zip | |
bootstrap: Don't apply `-Ztls-model=initial-exec` to deps of proc-macros
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/bin/rustc.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/src/bin/rustc.rs b/src/bootstrap/src/bin/rustc.rs index 88595ff7e51..61045067592 100644 --- a/src/bootstrap/src/bin/rustc.rs +++ b/src/bootstrap/src/bin/rustc.rs @@ -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(); @@ -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"); } |
