Skip to content
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

Rollup of 5 pull requests #138208

Merged
merged 21 commits into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e0b7577
linux x64: default to `-znostart-stop-gc`
lqd Feb 26, 2025
0dfe2ae
Windows: Use MoveFileEx by default in `fs:rename`
ChrisDenton Feb 24, 2025
3cb53df
Return OutOfMemoryError and update docs
ChrisDenton Mar 6, 2025
d975bd3
Remove highlighting of spans on `-Zteach`
estebank Feb 27, 2025
72326bf
On long spans, trim the middle of them to make them fit in the termin…
estebank Feb 27, 2025
f1c751b
Refactor `emitter` to better account for unicode chars when trimming
estebank Feb 27, 2025
cb82b79
Fix rustdoc test
estebank Feb 27, 2025
c75da0e
Fix multiline span start special case
estebank Feb 27, 2025
a04c47a
Make trimming logic work on more than one span at a time
estebank Feb 28, 2025
db2fb71
fix rebase
estebank Mar 7, 2025
fb04372
Move all alloc integration tests to a new alloctests crate
bjorn3 Feb 6, 2025
be1e0b7
Move most Rc tests to alloctests
bjorn3 Feb 6, 2025
701bedc
Move last remaining Rc test to alloctests
bjorn3 Feb 6, 2025
ae5687e
Fully test the alloc crate through alloctests
bjorn3 Feb 6, 2025
22d0440
Add comments
bjorn3 Feb 13, 2025
17dd2b1
Mention `env` and `option_env` macros in `std::env::var` docs
GuillaumeGomez Mar 7, 2025
720eacf
Rollup merge of #136642 - bjorn3:separate_alloctest_crate, r=cuviper
jhpratt Mar 8, 2025
0c67061
Rollup merge of #137528 - ChrisDenton:rename-win, r=joboet
jhpratt Mar 8, 2025
dfae8e8
Rollup merge of #137685 - lqd:nostart-stop-gc, r=petrochenkov
jhpratt Mar 8, 2025
2c374e3
Rollup merge of #137757 - estebank:trim-spans, r=davidtwco
jhpratt Mar 8, 2025
6576d35
Rollup merge of #138189 - GuillaumeGomez:env-var, r=joshtriplett
jhpratt Mar 8, 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ index 7165c3e48af..968552ad435 100644
--- a/library/alloc/Cargo.toml
+++ b/library/alloc/Cargo.toml
@@ -11,7 +11,7 @@ test = { path = "../test" }
edition = "2021"
bench = false

[dependencies]
core = { path = "../core", public = true }
-compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std'] }
+compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std', 'no-f16-f128'] }

[dev-dependencies]
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
[features]
compiler-builtins-mem = ['compiler_builtins/mem']
--
2.34.1

29 changes: 29 additions & 0 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3382,6 +3382,35 @@ 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");

// On ELF platforms like at least x64 linux, 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.
if sess.target.llvm_target == "x86_64-unknown-linux-gnu" {
cmd.link_arg("-znostart-stop-gc");
}
}

if !flavor.is_gnu() {
Expand Down
Loading
Loading