linker: Remove the "--whole-archive in test mode" backcompat hack by petrochenkov · Pull Request #128400 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation27 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

petrochenkov

@petrochenkov

@rustbot

r? @Nadrieril

rustbot has assigned @Nadrieril.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jul 30, 2024

@petrochenkov

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 30, 2024

@bors

linker: Remove the "--whole-archive in test mode" backcompat hack

Fixes rust-lang#116910.

@bors

@Nadrieril

@bors

☀️ Try build successful - checks-actions
Build commit: 33f1d8b (33f1d8bb92813a1bfc23c093c9f443ab09290307)

@petrochenkov

@craterbot run mode=build-and-test +cargoflags=--no-run

@craterbot

🚨 Error: failed to parse the command

🆘 If you have any trouble with Crater please ping @rust-lang/infra!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@petrochenkov

@craterbot

@craterbot

🚧 Experiment pr-128400 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

@petrochenkov

@craterbot

@craterbot

🚧 Experiment pr-128400-1 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@bors

📌 Commit 3d2d7cf has been approved by bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Aug 10, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 10, 2024

@bors

linker: Remove the "--whole-archive in test mode" backcompat hack

Fixes rust-lang#116910.

@bors

@rust-log-analyzer

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bjorn3

@bors retry failed to remove executable with "Access is denied"

@bors

@bors

@rust-timer

Finished benchmarking commit (04dff01): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.2%, secondary 2.5%)

This 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.

mean range count
Regressions ❌ (primary) 3.2% [3.2%, 3.2%] 1
Regressions ❌ (secondary) 2.5% [2.5%, 2.5%] 1
Improvements ✅ (primary) - - 0
Improvements ✅ (secondary) - - 0
All ❌✅ (primary) 3.2% [3.2%, 3.2%] 1

Cycles

Results (secondary -4.4%)

This 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.

mean range count
Regressions ❌ (primary) - - 0
Regressions ❌ (secondary) - - 0
Improvements ✅ (primary) - - 0
Improvements ✅ (secondary) -4.4% [-4.4%, -4.3%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 758.54s -> 756.781s (-0.23%)
Artifact size: 339.24 MiB -> 339.30 MiB (0.02%)

@saethlin saethlin added the relnotes

Marks issues that should be documented in the release notes of the next release.

label

Sep 24, 2024

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Oct 18, 2024

@tmeijn

This MR contains the following updates:

Package Update Change
rust minor 1.81.0 -> 1.82.0

MR created with the help of el-capitano/tools/renovate-bot.

Proposed changes to behavior should be submitted there as MRs.


Release Notes

rust-lang/rust (rust)

v1.82.0

Compare Source

==========================

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.



This MR has been generated by Renovate Bot.

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request

Oct 27, 2024

@he32

Pkgsrc changes:

Upstream changes:

Version 1.82.0 (2024-10-17)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

@ehuss ehuss mentioned this pull request

Oct 28, 2024

jetuk added a commit to pywr/pywr-next that referenced this pull request

Nov 6, 2024

@jetuk

Rust 1.82 removed a linker option (--whole-archive) which has broken linking on Linux. This reorders the building / linking so that the linker finds the correct libraries.

See rust-lang/rust#128400

@jetuk jetuk mentioned this pull request

Nov 6, 2024

jetuk added a commit to pywr/pywr-next that referenced this pull request

Nov 6, 2024

@jetuk

Rust 1.82 removed a linker option (--whole-archive) which has broken linking on Linux. This reorders the building / linking so that the linker finds the correct libraries.

See rust-lang/rust#128400

@nyurik

@petrochenkov I hit an issue with this - my project has a large cmake-based C++ code, and I'm trying to write a Rust wrapper using cxx bridge. cargo test was passing on older Rust, but unexpectedly failed with 1.82+ until I saw that kuzu project also did a hack here, which did work. This seems like a major hack - is this the expected usage of this feature?

if rustversion::cfg!(since(1.82)) { println!("cargo:rustc-link-lib=static:+whole-archive=kuzu"); } else { println!("cargo:rustc-link-lib=static=kuzu"); }

@petrochenkov

The recommended fixes are the same as in https://doc.rust-lang.org/beta/releases.html#compatibility-notes-21.
It's more likely that some native dependencies should be reordered, and less likely that +whole-archive needs to be added (which can be done unconditionally, without a version check). I cannot say which alternative is appropriate without looking at the specific libraries in more detail.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request

Feb 2, 2025

@he32

Pkgsrc changes:

Upstream changes:

Version 1.82.0 (2024-10-17)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Labels

merged-by-bors

This PR was explicitly merged by bors.

relnotes

Marks issues that should be documented in the release notes of the next release.

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.