Fix no-link-with-link-args by introducing another normalization.
This commit is contained in:
parent
003b5a8b0f
commit
7c13eb42d4
@ -1,6 +1,6 @@
|
||||
error: linking with `ld` failed: exit code: 1
|
||||
|
|
||||
= note: "ld" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "$TEST_BUILD_DIR/nolink-with-link-args.nll/a.nolink_with_link_args0-317d481089b8c8fe83113de504472633.rs.rcgu.o" "$TEST_BUILD_DIR/nolink-with-link-args.nll/a.nolink_with_link_args1-317d481089b8c8fe83113de504472633.rs.rcgu.o" "-o" "$TEST_BUILD_DIR/nolink-with-link-args.nll/a" "--gc-sections" "-pie" "-zrelro" "-znow" "-O1" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "$TEST_BUILD_DIR/nolink-with-link-args.nll/auxiliary" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--start-group" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-41f43a30bc296e4f" "--end-group" "-Bstatic" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ce73107aecc35a63.rlib" "-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-rpath,/home/david/projects/rust/workdirs/rust1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--enable-new-dtags" "aFdEfSeVEEE"
|
||||
= note: "ld" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "$TEST_BUILD_DIR/nolink-with-link-args.nll/a.nolink_with_link_args0-317d481089b8c8fe83113de504472633.rs.rcgu.o" "$TEST_BUILD_DIR/nolink-with-link-args.nll/a.nolink_with_link_args1-317d481089b8c8fe83113de504472633.rs.rcgu.o" "-o" "$TEST_BUILD_DIR/nolink-with-link-args.nll/a" "--gc-sections" "-pie" "-zrelro" "-znow" "-O1" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "$TEST_BUILD_DIR/nolink-with-link-args.nll/auxiliary" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--start-group" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-XXXXXXXXXXXXXXXX" "--end-group" "-Bstatic" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-XXXXXXXXXXXXXXXX.rlib" "-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-rpath,$LIB_DIR/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--enable-new-dtags" "aFdEfSeVEEE"
|
||||
= note: ld: unrecognized option '-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib'
|
||||
ld: use the --help option for usage information
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// normalize-stderr-test: "-lstd-[\d\w]{16}" -> "-lstd-XXXXXXXXXXXXXXXX"
|
||||
// normalize-stderr-test: "builtins-[\d\w]{16}.rlib" -> "builtins-XXXXXXXXXXXXXXXX.rlib"
|
||||
|
||||
// error-pattern:aFdEfSeVEE
|
||||
// compile-flags: -Z linker-flavor=ld
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
error: linking with `ld` failed: exit code: 1
|
||||
|
|
||||
= note: "ld" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "$TEST_BUILD_DIR/nolink-with-link-args/a.nolink_with_link_args0-317d481089b8c8fe83113de504472633.rs.rcgu.o" "$TEST_BUILD_DIR/nolink-with-link-args/a.nolink_with_link_args1-317d481089b8c8fe83113de504472633.rs.rcgu.o" "-o" "$TEST_BUILD_DIR/nolink-with-link-args/a" "--gc-sections" "-pie" "-zrelro" "-znow" "-O1" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "$TEST_BUILD_DIR/nolink-with-link-args/auxiliary" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--start-group" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-41f43a30bc296e4f" "--end-group" "-Bstatic" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ce73107aecc35a63.rlib" "-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-rpath,/home/david/projects/rust/workdirs/rust1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--enable-new-dtags" "aFdEfSeVEEE"
|
||||
= note: "ld" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "$TEST_BUILD_DIR/nolink-with-link-args/a.nolink_with_link_args0-317d481089b8c8fe83113de504472633.rs.rcgu.o" "$TEST_BUILD_DIR/nolink-with-link-args/a.nolink_with_link_args1-317d481089b8c8fe83113de504472633.rs.rcgu.o" "-o" "$TEST_BUILD_DIR/nolink-with-link-args/a" "--gc-sections" "-pie" "-zrelro" "-znow" "-O1" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "$TEST_BUILD_DIR/nolink-with-link-args/auxiliary" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--start-group" "-L" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-XXXXXXXXXXXXXXXX" "--end-group" "-Bstatic" "$BUILD_DIR/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-XXXXXXXXXXXXXXXX.rlib" "-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-rpath,$LIB_DIR/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--enable-new-dtags" "aFdEfSeVEEE"
|
||||
= note: ld: unrecognized option '-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib'
|
||||
ld: use the --help option for usage information
|
||||
|
||||
|
@ -2927,6 +2927,11 @@ fn normalize_output(&self, output: &str, custom_rules: &[(String, String)]) -> S
|
||||
// eg. /home/user/rust/build
|
||||
normalized = normalized.replace(&parent_build_dir.to_str().unwrap(), "$BUILD_DIR");
|
||||
|
||||
// Paths into lib directory.
|
||||
let mut lib_dir = parent_build_dir.parent().unwrap().to_path_buf();
|
||||
lib_dir.push("lib");
|
||||
normalized = normalized.replace(&lib_dir.to_str().unwrap(), "$LIB_DIR");
|
||||
|
||||
if json {
|
||||
// escaped newlines in json strings should be readable
|
||||
// in the stderr files. There's no point int being correct,
|
||||
|
Loading…
Reference in New Issue
Block a user