Skip to content

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jan 24, 2025

That's a gcc flag. lld is a linker, not a C compiler, and doesn't accept a use-ld flag. -C linker=rust-lld (which is already present in the test) is enough.

This fixes the following warning found in rust-lang/rust#119286:

---- expected: tests\testsuite\freshness.rs:2822:27
++++ actual:   stderr
   1    1 | [FRESH] foo v0.1.0 ([ROOT]/foo)
        2 + [WARNING] linker stderr: rust-lld: ignoring unknown argument '-fuse-ld=lld'␍
        3 +   |
        4 +   = [NOTE] `#[warn(linker_messages)]` on by default
        5 +
        6 + [WARNING] `foo` (lib) generated 1 warning
   2    7 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

@rustbot
Copy link
Collaborator

rustbot commented Jan 24, 2025

r? @epage

rustbot has assigned @epage.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2025
That's a gcc flag. lld is a linker, not a C compiler, and doesn't accept
a `use-ld` flag. `-C linker` (which is already present in the test) is
enough.

This fixes the following warning found in rust-lang/rust#119286:
```
---- expected: tests\testsuite\freshness.rs:2822:27
++++ actual:   stderr
   1    1 | [FRESH] foo v0.1.0 ([ROOT]/foo)
        2 + [WARNING] linker stderr: rust-lld: ignoring unknown argument '-fuse-ld=lld'␍
        3 +   |
        4 +   = [NOTE] `#[warn(linker_messages)]` on by default
        5 +
        6 + [WARNING] `foo` (lib) generated 1 warning
   2    7 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
```
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Thanks!

@weihanglo weihanglo enabled auto-merge January 24, 2025 17:07
@weihanglo weihanglo added this pull request to the merge queue Jan 24, 2025
Merged via the queue into rust-lang:master with commit cecde95 Jan 24, 2025
21 checks passed
@jyn514 jyn514 deleted the lld-test-args branch January 24, 2025 17:47
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2025
Update cargo

5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4
2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000
- Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097)
- Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096)
- Print globs when workspace members can't be found (rust-lang/cargo#15093)
- Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013)
- fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
@rustbot rustbot added this to the 1.86.0 milestone Jan 25, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jan 26, 2025
Update cargo

5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4
2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000
- Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097)
- Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096)
- Print globs when workspace members can't be found (rust-lang/cargo#15093)
- Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013)
- fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jan 27, 2025
Update cargo

5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4
2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000
- Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097)
- Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096)
- Print globs when workspace members can't be found (rust-lang/cargo#15093)
- Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013)
- fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants