Skip to content

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

Open
@kennytm

Description

@kennytm

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-crossArea: Cross compilationA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-emscriptenTarget: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions