Skip to content

Workaround for windows-gnu rust-lld test failure #140396

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

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions tests/run-make/amdgpu-kd/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
//@ needs-llvm-components: amdgpu
//@ needs-rust-lld

use run_make_support::targets::is_windows_gnu;
use run_make_support::{llvm_readobj, rustc};

fn main() {
// FIXME(#115985): rust-lld on gnu targets may spuriously fail with
// STATUS_HEAP_CORRUPTION (0xc0000374).
// To try to mitigate this we pass --threads=1 to the linker.
let extra_args: &[&str] = if is_windows_gnu() { &["-C", "link-arg=--threads=1"] } else { &[] };
rustc()
.crate_name("foo")
.target("amdgcn-amd-amdhsa")
.arg("-Ctarget-cpu=gfx900")
.args(&extra_args)
.crate_type("cdylib")
.input("foo.rs")
.run();
Expand Down
Loading