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

Downgrade linker-warnings to allow-by-default #136098

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jan 26, 2025

This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy.

cc #136096
fixes #136086 (comment)

r? @saethlin cc @Noratrieb @bjorn3

@rustbot label A-linkage L-linker_messages

@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 Jan 26, 2025
@rustbot rustbot added A-linkage Area: linking into static, shared libraries and binaries L-linker_messages Lint: linker_messages labels Jan 26, 2025
@Noratrieb
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Jan 26, 2025

📌 Commit cc0af36 has been approved by Noratrieb

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 Jan 26, 2025
@rust-log-analyzer

This comment has been minimized.

@Noratrieb
Copy link
Member

@bors r-
I look really silly now

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 26, 2025
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Jan 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2025

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@@ -12,7 +12,7 @@ use run_make_support::rustc;
fn main() {
// A regular compilation should not use rust-lld by default. We'll check that by asking the
// linker to display its version number with a link-arg.
let output = rustc().link_arg("-Wl,-v").input("main.rs").run();
let output = rustc().arg("-Wlinker-messages").link_arg("-Wl,-v").input("main.rs").run();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @rust-lang/release it continues to make me very uncomfortable to be editing tests that i have no way of running. if this fails in 6 weeks i do not know if i will have time to fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally, you can config [rust] channel = "beta" (or stable). For CI, you could temporarily change src/ci/channel for a @bors try attempt.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test runs in every merge via the x86_64-gnu-stable job:

https://github.com/rust-lang-ci/rust/actions/runs/12975734650/job/36187153380

2025-01-26T16:46:32.1849227Z test [run-make] tests/run-make/rust-lld-by-default-beta-stable ... ok

ehuss added a commit to ehuss/cargo that referenced this pull request Jan 26, 2025
Nightly recently introduced the `linker-messages` lint which prints any
messages from linkers. These tests were triggering that lint because
they were passing missing directories to the linker. This fixes it by
creating empty directories to pass to the linker.

Note that this lint will be downgraded soon via
rust-lang/rust#136098, but it seemed worthwhile
to fix the underlying problem.

This also fixes a problem where build_script_needed_for_host_and_target
was not testing for the correct command-line flags. These got lost
in rust-lang#14132.
@saethlin
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 27, 2025

📌 Commit e6e619e has been approved by saethlin

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 27, 2025
@bors
Copy link
Contributor

bors commented Jan 27, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 27, 2025
This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy.
@saethlin
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 27, 2025

📌 Commit 97311a8 has been approved by saethlin

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 Jan 27, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 27, 2025
Downgrade `linker-warnings` to allow-by-default

This needs more time to bake before we turn it on. Turning it on early risks people silencing the warning indefinitely, before we have the chance to make it less noisy.

cc rust-lang#136096
fixes rust-lang#136086 (comment)

r? `@saethlin` cc `@Noratrieb` `@bjorn3`

`@rustbot` label A-linkage L-linker_messages
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#135876 (fix doc for std::sync::mpmc)
 - rust-lang#135961 (Fix 2/4 tests skipped by opt-dist)
 - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library)
 - rust-lang#136098 (Downgrade `linker-warnings` to allow-by-default)
 - rust-lang#136110 (Miri subtree update)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#135876 (fix doc for std::sync::mpmc)
 - rust-lang#135961 (Fix 2/4 tests skipped by opt-dist)
 - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library)
 - rust-lang#136098 (Downgrade `linker-warnings` to allow-by-default)
 - rust-lang#136110 (Miri subtree update)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
@jieyouxu
Copy link
Member

@bors p=10

@pietroalbini
Copy link
Member

@bors p=10

Now go to sleep >:(

@bors
Copy link
Contributor

bors commented Jan 27, 2025

⌛ Testing commit 97311a8 with merge 0cffe5c...

@bors
Copy link
Contributor

bors commented Jan 27, 2025

☀️ Test successful - checks-actions
Approved by: saethlin
Pushing 0cffe5c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 27, 2025
@bors bors merged commit 0cffe5c into rust-lang:master Jan 27, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 27, 2025
@jyn514 jyn514 deleted the linker-output branch January 27, 2025 17:54
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0cffe5c): 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 (secondary 3.7%)

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)
3.7% [3.4%, 4.0%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 773.18s -> 772.206s (-0.13%)
Artifact size: 328.23 MiB -> 328.24 MiB (0.00%)

ranger-ross pushed a commit to ranger-ross/cargo that referenced this pull request Feb 1, 2025
Nightly recently introduced the `linker-messages` lint which prints any
messages from linkers. These tests were triggering that lint because
they were passing missing directories to the linker. This fixes it by
creating empty directories to pass to the linker.

Note that this lint will be downgraded soon via
rust-lang/rust#136098, but it seemed worthwhile
to fix the underlying problem.

This also fixes a problem where build_script_needed_for_host_and_target
was not testing for the correct command-line flags. These got lost
in rust-lang#14132.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-run-make Area: port run-make Makefiles to rmake.rs L-linker_messages Lint: linker_messages merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linker failure on macOS when building Miri: "linker stderr: ld: ignoring duplicate libraries"