Open
Description
ui, incremental test suites all have implicit access to a C helper static library built for the host/target platforms, called rust_test_helpers
.
EDIT: two copies, one for host, one for target, see
rust/src/bootstrap/src/core/build_steps/test.rs
Lines 1791 to 1798 in 243c5a3
https://github.com/rust-lang/rust/blob/master/tests/auxiliary/rust_test_helpers.c
https://github.com/search?q=repo%3Arust-lang%2Frust%20rust_test_helpers&type=code
This is kinda strange for a few reasons:
- All
tests/{ui,incremental}
tests implicitly have the built C static lib in the linker search paths, even if the test doesn't need it - A test might not need
rust_test_helpers
, but during bootstrap, it will be unconditionally built for the target anyway (requires a working target C compiler toolchain). - You can't specify or override what C compiler flags
rust_test_helpers
is built with. Notably, this includes optimization levels or debuginfo levels, or sanitizers or whatever. Everytests/{ui,incremental}
gets access to the same prebuilt copy.
I'm not looking to change this any time soon, since it needs some surveying on what use cases tests using rust_test_helpers
are exercising to come up with more robust alternative designs.
Metadata
Metadata
Assignees
Labels
Area: test infrastructure (may span bootstrap/compiletest/more)Area: The testsuite used to check the correctness of rustcCategory: This is a bug.Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the compiler team, which will review and decide on the PR/issue.