Skip to content

When running Emscripten tests, rustbuild should tell compilertest the version of the Emscripten LLVM, not the host LLVM #49063

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

Open
kennytm opened this issue Mar 15, 2018 · 1 comment
Labels
A-cross Area: Cross compilation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@kennytm
Copy link
Member

kennytm commented Mar 15, 2018

Discovered in #48983 (comment). It seems rustbuild will always passes information about the host LLVM config, even when running Emscripten tests.

rust/src/bootstrap/test.rs

Lines 911 to 920 in 3926453

if build.config.llvm_enabled {
let llvm_config = builder.ensure(native::Llvm {
target: build.config.build,
emscripten: false,
});
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
cmd.arg("--llvm-version").arg(llvm_version);
if !build.is_rust_llvm(target) {
cmd.arg("--system-llvm");
}

This makes min-llvm-version reports the wrong value and failed to ignore some tests.

cc #48757 (probably a regression introduced by this PR)

@kennytm kennytm added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. WG-infra-rustbuild labels Mar 15, 2018
@kennytm
Copy link
Member Author

kennytm commented Mar 15, 2018

I think changing that false to target.contains("emscripten") is enough?

@jyn514 jyn514 added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc A-cross Area: Cross compilation labels May 20, 2023
@workingjubilee workingjubilee added the O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross Area: Cross compilation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

4 participants