Skip to content

Rollup of 10 pull requests #137918

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

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
adaa756
Add more ranges parsing tests
dtolnay Dec 29, 2024
462604d
Fix parsing of ranges after unary operators
dtolnay Dec 29, 2024
932f7fd
Make phantom variance markers transparent
jhpratt Feb 15, 2025
2bead27
remove : from stack-protector-heuristics-effect.rs filecheck
mustartt Feb 12, 2025
fb8c993
fix label suffix
mustartt Feb 20, 2025
41a7c83
Skip `tidy` in pre-push hook if the user is deleting a remote branch
yotamofek Feb 25, 2025
762fdf6
default to `-znostart-stop-gc`
lqd Feb 26, 2025
396c2a8
Stop using `hash_raw_entry` in `CodegenCx::const_str`
cuviper Feb 27, 2025
32de3b9
Revert "Remove Win SDK 10.0.26100.0 from CI"
jieyouxu Mar 1, 2025
42f51d4
Implment `#[cfg]` and `#[cfg_attr]` in `where` clauses
frank-king Feb 5, 2025
6f505ba
ensure we always print all --print options in help
mtoner23 Mar 1, 2025
7603e01
Simplify parallelization in test-float-parse
tgross35 Dec 31, 2024
ecec1ac
Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkov
matthiaskrgr Mar 3, 2025
1b353d6
Rollup merge of #134900 - dtolnay:unoprange, r=compiler-errors,davidtwco
matthiaskrgr Mar 3, 2025
35e9383
Rollup merge of #136938 - mustartt:fix-stack-protector-filecheck, r=M…
matthiaskrgr Mar 3, 2025
44368a5
Rollup merge of #137054 - jhpratt:phantom-variance, r=Mark-Simulacrum
matthiaskrgr Mar 3, 2025
6f1ad99
Rollup merge of #137525 - tgross35:test-float-parse-less-parallelizat…
matthiaskrgr Mar 3, 2025
66cea79
Rollup merge of #137618 - yotamofek:pr/pre-push-hook, r=Mark-Simulacrum
matthiaskrgr Mar 3, 2025
e69d710
Rollup merge of #137685 - lqd:nostart-stop-gc, r=petrochenkov
matthiaskrgr Mar 3, 2025
f68727b
Rollup merge of #137741 - cuviper:const_str-raw_entry, r=Mark-Simulacrum
matthiaskrgr Mar 3, 2025
45315a4
Rollup merge of #137849 - jieyouxu:undo-workaround, r=Kobzol
matthiaskrgr Mar 3, 2025
5f3394b
Rollup merge of #137862 - mtoner23:print-help, r=nnethercote
matthiaskrgr Mar 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
default to -znostart-stop-gc
This will help stabilization of lld.
  • Loading branch information
lqd committed Feb 26, 2025
commit 762fdf6636da708ab4dfc7578b9c26f8fa9079bf
26 changes: 26 additions & 0 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3434,6 +3434,32 @@ fn add_lld_args(
// this, `wasm-component-ld`, which is overridden if this option is passed.
if !sess.target.is_like_wasm {
cmd.cc_arg("-fuse-ld=lld");

// GNU ld and LLD have opposite defaults on some section garbage-collection features. For
// example, the somewhat popular `linkme` crate and its dependents rely in practice on this
// difference: when using lld, they need `-z nostart-stop-gc` to prevent encapsulation
// symbols and sections from being garbage-collected.
//
// More information about all this can be found in:
// - https://maskray.me/blog/2021-01-31-metadata-sections-comdat-and-shf-link-order
// - https://lld.llvm.org/ELF/start-stop-gc
//
// So when using lld, we restore, for now, the traditional behavior to help migration, but
// will remove it in the future.
// Since this only disables an optimization, it shouldn't create issues, but is in theory
// slightly suboptimal. However, it:
// - doesn't have any visible impact on our benchmarks
// - reduces the need to disable lld for the crates that depend on this
//
// Note that lld can detect some cases where this difference is relied on, and emits a
// dedicated error to add this link arg. We could make use of this error to emit an FCW. As
// of writing this, we don't do it, because lld is already enabled by default on nightly
// without this mitigation: no working project would see the FCW, so we do this to help
// stabilization.
//
// FIXME: emit an FCW if linking fails due its absence, and then remove this link-arg in the
// future.
cmd.link_arg("-znostart-stop-gc");
}

if !flavor.is_gnu() {
Expand Down
Loading