Description
This test:
rust/src/test/run-pass/lib-defaults.rs
Lines 13 to 18 in fccde00
is causing the following compile-time output to stderr (on Linux; not sure about other hosts):
warning: redundant linker flag specified for library `rust_test_helpers`
This is the command line that compiletest is constructing:
command: "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/src/test/run-pass/lib-defaults.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/run-pass/lib-defaults/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-lrust_test_helpers" "-L" "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/run-pass/lib-defaults/auxiliary"
I haven't delved deeply into what our requirements are for linkage directives. I'm guessing that rustc
is able to construct the desired -lrust_test_helpers
from the presence of the #[link(name = "rust_test_helpers", kind = "static")]
, but it might be good to know if that is the case on all of our platforms?
(I.e. maybe we should strive to remove the // compile-flags: -lrust_test_helpers
directive from this test, or if that fails, maybe it conditional on which platform we are testing on...)
In any case I am mainly filling this ticket so I have something to link to in the test when I explain why I'm ignoring the stderr output from the compiler in this case.