Open
Description
While running the test suite I noticed that executing the run-make-fulldeps
suite before the ui
suite causes the following tests to fail:
ui/allocator/no_std-alloc-error-handler-default.rs
ui/allocator/no_std-alloc-error-handler-custom.rs
error[E0464]: multiple matching crates for `libc`
--> /.../src/test/ui/allocator/no_std-alloc-error-handler-default.rs:16:1
|
LL | extern crate libc;
| ^^^^^^^^^^^^^^^^^^
|
= note: candidates:
crate `libc`: /.../build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-2383dbda905dd8ee.rlib
crate `libc`: /.../build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a96bf8e49971bcfd.rlib
error: aborting due to previous error
For more information about this error, try `rustc --explain E0464`.
After a quick investigation it seems like building rustc-demangler
puts an extra copy of liblibc-HASH.rlib
(with a different hash) in the stage2 libs directory, causing the UI test not to know which libc
to link to.
Reproduction
Running this command (just the ui
test before run-make-fulldeps
) works:
./x.py --stage 2 test src/test/ui/allocator/no_std-alloc-error-handler-default.rs src/test/run-make-fulldeps
Running this command (run-make-fulldeps
before the ui
test) fails:
./x.py --stage 2 src/test/run-make-fulldeps test src/test/ui/allocator/no_std-alloc-error-handler-default.rs