Skip to content

Conversation

dpaoliello
Copy link
Contributor

@dpaoliello dpaoliello commented May 13, 2025

#140758 added the /arm64hazardfree linker arg for aarch64-pc-windows-msvc, unfortunately this breaks linking with lld as it 1) doesn't understand the arguments and 2) assumes that unknown args that start with / are input files.

Fix is to use a dash for the arg: -arm64hazardfree

r? @wesleywiser

@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 May 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@dpaoliello
Copy link
Contributor Author

r? @jieyouxu

(Sorry, referenced the wrong PR as causing the regression)

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks

@jieyouxu
Copy link
Member

r? jieyouxu @bors r+ rollup

@rustbot

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 14, 2025

📌 Commit a1ea0ce has been approved by jieyouxu

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 May 14, 2025
@bors
Copy link
Collaborator

bors commented May 14, 2025

⌛ Testing commit a1ea0ce with merge 55429e2...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2025
[win] Use a dash instead of slash for linker to avoid breaking lld

rust-lang#140758 added the `/arm64hazardfree` linker arg for aarch64-pc-windows-msvc, unfortunately this breaks linking with `lld` as it 1) doesn't understand the arguments and 2) assumes that unknown args that start with `/` are input files.

Fix is to use a dash for the arg: `-arm64hazardfree`

r? `@wesleywiser`
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
test [rustdoc] tests\rustdoc\private\files-creation-private.rs ... FAILED
test [rustdoc] tests\rustdoc\private\hidden-private.rs ... FAILED
test [rustdoc] tests\rustdoc\private\inline-private-with-intermediate-doc-hidden.rs ... FAILED
test [rustdoc] tests\rustdoc\private\inner-private-110422.rs ... FAILED
test [rustdoc] tests\rustdoc\private\macro-document-private-duplicate.rs ... ignored, ignored always ((fa2025-05-14T07:38:33.7790497Z ##[error]There is not enough space on the disk. : 'C:\actions-runner\cached\_diag\blocks\5e069e9a-a3b8-445c-8b4c-268021635ec2_27eb41a7-2ed4-56f7-ee04-8c5e17bd5c5c.2'
##[error]There is not enough space on the disk. : 'C:\actions-runner\cached\_diag\pages\5e069e9a-a3b8-445c-8b4c-268021635ec2_ccc4059e-4ea2-4996-9631-737428769f20_1.log'

@bors
Copy link
Collaborator

bors commented May 14, 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 May 14, 2025
@jieyouxu
Copy link
Member

@bors retry (not enough space)

@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 May 14, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request May 14, 2025
[win] Use a dash instead of slash for linker to avoid breaking lld

rust-lang#140758 added the `/arm64hazardfree` linker arg for aarch64-pc-windows-msvc, unfortunately this breaks linking with `lld` as it 1) doesn't understand the arguments and 2) assumes that unknown args that start with `/` are input files.

Fix is to use a dash for the arg: `-arm64hazardfree`

r? `@wesleywiser`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2025
Rollup of 4 pull requests

Successful merges:

 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld)

r? `@ghost`
`@rustbot` modify labels: rollup
@glandium
Copy link
Contributor

Fix is to use a dash for the arg: -arm64hazardfree

For a value of "fix" that means lld emitting a warning about an unknown argument.

compiler-errors added a commit to compiler-errors/rust that referenced this pull request May 15, 2025
[win] Use a dash instead of slash for linker to avoid breaking lld

rust-lang#140758 added the `/arm64hazardfree` linker arg for aarch64-pc-windows-msvc, unfortunately this breaks linking with `lld` as it 1) doesn't understand the arguments and 2) assumes that unknown args that start with `/` are input files.

Fix is to use a dash for the arg: `-arm64hazardfree`

r? `@wesleywiser`
@dpaoliello
Copy link
Contributor Author

Fix is to use a dash for the arg: -arm64hazardfree

For a value of "fix" that means lld emitting a warning about an unknown argument.

Unfortunately, #133409 forced the lld and non-lld args to be the same, and there doesn't seem to be a standard way to indicate that an argument is intentionally different between the two.

@RalfJung @petrochenkov what's the correct way to add an MSVC linker ONLY arg that SHOULDN'T be passed to lld?

@dpaoliello
Copy link
Contributor Author

Nevermind, the more that I think about this, the more that I believe that using the undocumented flag is the incorrect solution.

I'm going to disable the test instead, and I've filed a bug against the MSVC team to remove this check from the linker: https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134

@dpaoliello
Copy link
Contributor Author

Abandoning in favor of #141045

@dpaoliello dpaoliello closed this May 15, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…mpiler-errors

Rollup of 14 pull requests

Successful merges:

 - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary")
 - rust-lang#140130 (Add LLDB providers for BTreeMap and BTreeSet)
 - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`)
 - rust-lang#140712 (normalization: avoid incompletely constraining GAT args)
 - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output)
 - rust-lang#140834 (move (or remove) some impl Trait tests)
 - rust-lang#140910 (Remove `stable` attribute from wasi fs (read_exact|write_all)_at)
 - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`)
 - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc)
 - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld)
 - rust-lang#140990 (VxWorks: updates from recent libc versions)
 - rust-lang#141003 (Improve ternary operator recovery)
 - rust-lang#141013 (Implement methods to set STARTUPINFO flags for Command API on Windows)
 - rust-lang#141026 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
fmease added a commit to fmease/rust that referenced this pull request May 18, 2025
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test

PR rust-lang#140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor.

Adding this flag caused issues with LLD, as it doesn't recognize it.

Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning.

Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134>

This PR supersedes rust-lang#140977

r? `@jieyouxu`
fmease added a commit to fmease/rust that referenced this pull request May 18, 2025
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test

PR rust-lang#140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor.

Adding this flag caused issues with LLD, as it doesn't recognize it.

Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning.

Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134>

This PR supersedes rust-lang#140977

r? ``@jieyouxu``
fmease added a commit to fmease/rust that referenced this pull request May 18, 2025
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test

PR rust-lang#140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor.

Adding this flag caused issues with LLD, as it doesn't recognize it.

Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning.

Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134>

This PR supersedes rust-lang#140977

r? ```@jieyouxu```
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2025
Rollup merge of rust-lang#141045 - dpaoliello:noarmhazard, r=jieyouxu

[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test

PR rust-lang#140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor.

Adding this flag caused issues with LLD, as it doesn't recognize it.

Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning.

Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134>

This PR supersedes rust-lang#140977

r? ```@jieyouxu```
@dpaoliello dpaoliello deleted the dash branch August 5, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

7 participants