Skip to content

Commit 8ce1957

Browse files
committed
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros
1 parent 74653e3 commit 8ce1957

File tree

2 files changed

+158
-1
lines changed

2 files changed

+158
-1
lines changed

src/bootstrap/src/bin/rustc.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ use shared_helpers::{
2828
#[path = "../utils/shared_helpers.rs"]
2929
mod shared_helpers;
3030

31+
#[path = "../utils/proc_macro_deps.rs"]
32+
mod proc_macro_deps;
33+
3134
fn main() {
3235
let orig_args = env::args_os().skip(1).collect::<Vec<_>>();
3336
let mut args = orig_args.clone();
@@ -167,7 +170,7 @@ fn main() {
167170
// issue https://github.com/rust-lang/rust/issues/100530
168171
if env::var("RUSTC_TLS_MODEL_INITIAL_EXEC").is_ok()
169172
&& crate_type != Some("proc-macro")
170-
&& !matches!(crate_name, Some("proc_macro2" | "quote" | "syn" | "synstructure"))
173+
&& proc_macro_deps::CRATES.binary_search(&crate_name.unwrap_or_default()).is_err()
171174
{
172175
cmd.arg("-Ztls-model=initial-exec");
173176
}
+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
/// Holds all direct and indirect dependencies of proc-macro crates in tree. See #134863
2+
3+
pub static CRATES: &[&str] = &[
4+
// tidy-alphabetical-start
5+
"annotate-snippets",
6+
"anstyle",
7+
"autocfg",
8+
"basic-toml",
9+
"bitflags",
10+
"block-buffer",
11+
"bumpalo",
12+
"byteorder",
13+
"cfg-if",
14+
"clap_derive",
15+
"color-print-proc-macro",
16+
"cpufeatures",
17+
"crossbeam-channel",
18+
"crossbeam-deque",
19+
"crossbeam-epoch",
20+
"crossbeam-utils",
21+
"crypto-common",
22+
"darling",
23+
"darling_core",
24+
"darling_macro",
25+
"derive-where",
26+
"derive_builder_core",
27+
"derive_setters",
28+
"digest",
29+
"displaydoc",
30+
"either",
31+
"equivalent",
32+
"fluent-bundle",
33+
"fluent-langneg",
34+
"fluent-syntax",
35+
"fnv",
36+
"foldhash",
37+
"futf",
38+
"futures-macro",
39+
"generic-array",
40+
"getrandom",
41+
"hashbrown",
42+
"heck",
43+
"hermit-abi",
44+
"html5ever",
45+
"icu_provider_macros",
46+
"ident_case",
47+
"indexmap",
48+
"intl-memoizer",
49+
"intl_pluralrules",
50+
"itoa",
51+
"libc",
52+
"lock_api",
53+
"log",
54+
"mac",
55+
"markup5ever",
56+
"memchr",
57+
"mime",
58+
"mime_guess",
59+
"minimal-lexical",
60+
"new_debug_unreachable",
61+
"nom",
62+
"num_cpus",
63+
"once_cell",
64+
"parking_lot",
65+
"parking_lot_core",
66+
"pest",
67+
"pest_generator",
68+
"pest_meta",
69+
"phf",
70+
"phf_codegen",
71+
"phf_generator",
72+
"phf_shared",
73+
"ppv-lite86",
74+
"precomputed-hash",
75+
"proc-macro-hack",
76+
"proc-macro2",
77+
"quote",
78+
"rand",
79+
"rand_chacha",
80+
"rand_core",
81+
"rayon",
82+
"rayon-core",
83+
"redox_syscall",
84+
"rinja_derive",
85+
"rinja_parser",
86+
"rustc-hash",
87+
"rustc-rayon",
88+
"rustc-rayon-core",
89+
"rustc_fluent_macro",
90+
"rustc_index_macros",
91+
"rustc_macros",
92+
"rustc_type_ir_macros",
93+
"rustfmt-config_proc_macro",
94+
"rustversion",
95+
"ryu",
96+
"scopeguard",
97+
"self_cell",
98+
"serde",
99+
"serde_derive",
100+
"serde_json",
101+
"sha2",
102+
"siphasher",
103+
"smallvec",
104+
"stable_deref_trait",
105+
"string_cache",
106+
"string_cache_codegen",
107+
"strsim",
108+
"strum_macros",
109+
"syn",
110+
"synstructure",
111+
"tendril",
112+
"thiserror",
113+
"thiserror-impl",
114+
"tinystr",
115+
"tracing-attributes",
116+
"type-map",
117+
"typenum",
118+
"ucd-trie",
119+
"unic-langid",
120+
"unic-langid-impl",
121+
"unic-langid-macros",
122+
"unic-langid-macros-impl",
123+
"unicase",
124+
"unicode-ident",
125+
"unicode-width",
126+
"utf-8",
127+
"version_check",
128+
"wasi",
129+
"wasm-bindgen-backend",
130+
"wasm-bindgen-macro-support",
131+
"wasm-bindgen-shared",
132+
"windows-bindgen",
133+
"windows-implement",
134+
"windows-interface",
135+
"windows-metadata",
136+
"windows-targets",
137+
"windows_aarch64_gnullvm",
138+
"windows_aarch64_msvc",
139+
"windows_i686_gnu",
140+
"windows_i686_gnullvm",
141+
"windows_i686_msvc",
142+
"windows_x86_64_gnu",
143+
"windows_x86_64_gnullvm",
144+
"windows_x86_64_msvc",
145+
"yoke",
146+
"yoke-derive",
147+
"zerocopy",
148+
"zerocopy-derive",
149+
"zerofrom",
150+
"zerofrom-derive",
151+
"zerovec",
152+
"zerovec-derive",
153+
// tidy-alphabetical-end
154+
];

0 commit comments

Comments
 (0)