Revisit the rust_test_helpers
setup
#140680
Labels
A-test-infra
Area: test infrastructure (may span bootstrap/compiletest/more)
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-bug
Category: This is a bug.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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:
tests/{ui,incremental}
tests implicitly have the built C static lib in the linker search paths, even if the test doesn't need itrust_test_helpers
, but during bootstrap, it will be unconditionally built for the target anyway (requires a working target C compiler toolchain).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.The text was updated successfully, but these errors were encountered: