]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only pass `-C default-linker-libraries` with sanitizers
authorAlex Crichton <alex@alexcrichton.com>
Mon, 29 Oct 2018 17:00:23 +0000 (10:00 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 29 Oct 2018 17:00:23 +0000 (10:00 -0700)
This'll help retain test compatibility until 1.31.0 is released!

configure.ac
src/test/include.am

index ef8bb4e351fa94860fddd1c5d0953b5a856b4dc7..8f8aa438df5a7d1471c91282d12447606fbe0753 100644 (file)
@@ -1210,17 +1210,17 @@ dnl variable.
 RUST_LINKER_OPTIONS=""
 if test "x$have_clang" = "xyes"; then
        if test "x$CFLAGS_ASAN" != "x"; then
-               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_ASAN"
+               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_ASAN -Cdefault-linker-libraries"
        fi
        if test "x$CFLAGS_UBSAN" != "x"; then
-               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_UBSAN"
+               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_UBSAN -Cdefault-linker-libraries"
        fi
 else
        if test "x$CFLAGS_ASAN" != "x"; then
-               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=address"
+               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=address -Cdefault-linker-libraries"
        fi
        if test "x$CFLAGS_UBSAN" != "x"; then
-               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=undefined"
+               RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=undefined -Cdefault-linker-libraries"
        fi
 fi
 AC_SUBST(RUST_LINKER_OPTIONS)
index 4314581082bd79fdc32bb270076b76591bd0aab1..ecb76895799d83b423615b6e218252aad3734f13 100644 (file)
@@ -12,7 +12,7 @@ TESTS_ENVIRONMENT = \
        export EXTRA_CARGO_OPTIONS="$(EXTRA_CARGO_OPTIONS)"; \
        export CARGO_ONLINE="$(CARGO_ONLINE)"; \
        export CCLD="$(CCLD)"; \
-       export RUSTFLAGS="-C linker=`echo '$(CC)' | cut -d' ' -f 1` $(RUST_LINKER_OPTIONS) -C default-linker-libraries";
+       export RUSTFLAGS="-C linker=`echo '$(CC)' | cut -d' ' -f 1` $(RUST_LINKER_OPTIONS)";
 
 TESTSCRIPTS = \
        src/test/fuzz_static_testcases.sh \