[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Only pass `-C default-linker-libraries` with sanitizers
commit 82857849662189d25e1a06bf6b764c64d2468168
Author: Alex Crichton <alex@xxxxxxxxxxxxxxxx>
Date: Mon Oct 29 10:00:23 2018 -0700
Only pass `-C default-linker-libraries` with sanitizers
This'll help retain test compatibility until 1.31.0 is released!
---
configure.ac | 8 ++++----
src/test/include.am | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index ef8bb4e35..8f8aa438d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/src/test/include.am b/src/test/include.am
index 431458108..ecb768957 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -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 \
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits