-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict linker version script of proc-macro crates to just its two symbols #114470
Restrict linker version script of proc-macro crates to just its two symbols #114470
Conversation
…ported_symbols to only export the two symbols that proc-macros need.
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
r? @bjorn3 |
This comment has been minimized.
This comment has been minimized.
fix to test as proposed by wesleywiser Co-authored-by: Wesley Wiser <wwiser@gmail.com>
…conditional logic otherwise.
@bors r+ |
@bors p=1 Bumping priority as this fixes a P-high regression and is beta-nominated. |
⌛ Testing commit a2058dd with merge 0c68940e5658fa62941986c021cc6b447f48e281... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Whoops, I guess I need to add wasm32-unknown-unknown to the targets I include in my local testing. I'm skimming and I'm not seeing a clear pattern in how the other proc-macro crates in this directory avoid hitting this error. I'm guessing most of them are handling it via (oh, maybe the ones that don't need either of those two header entries are all compile-fail tests anyway... but derive-test.rs is still an exception to all of those conditions... I'm guessing |
@bors r=bjorn3 |
|
⌛ Testing commit a2a7f27 with merge b442d5cfa218c1af27110b73fe6e86e4dcb4ffe5... |
💔 Test failed - checks-actions |
@bors retry spurious connection error for remote test client |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a946c1e): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.766s -> 633.338s (0.25%) |
[beta] backport * Restrict linker version script of proc-macro crates to just its two symbols rust-lang#114470 * bootstrap: config: fix version comparison bug rust-lang#114440 * lint/ctypes: only try normalize rust-lang#113921 * Avoid tls access while iterating through mpsc thread entries rust-lang#113861 * Substitute types before checking inlining compatibility. rust-lang#113802 * Revert "fix: bug etc/bash_complettion -> src/etc/... to avoid copy error" rust-lang#113579 * lint/ctypes: fix () return type checks rust-lang#113457 * Rename and allow cast_ref_to_mut lint rust-lang#113422 * Ignore flaky clippy tests. rust-lang#113621 r? cuviper
Restrict linker version script of proc-macro crates to just the two symbols of each proc-macro crate.
The main known effect of doing this is to stop including
#[no_mangle]
symbols in the linker version script.Background:
The combination of a proc-macro crate with an import of another crate that itself exports a no_mangle function was broken for a period of time, because:
--no-undefined-version
link flag and fix associated breakage #108017 we started telling the linker to check (via the--no-undefined-version
linker invocation flag) that every symbol referenced in the "linker version script" is provided as linker input. So the unresolved discrepancy from Don't export no_mangle symbols from proc macros #99978 started surfacing as a compile-time error (e.g. regression - nightly 2023-03-30 -> 2023-03-31 causes linker error when importing wasm_bindgen::JsValue in a proc_macro #111888).Fix #111888
Fix #99978.