mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Only pass -C default-linker-libraries
with sanitizers
This'll help retain test compatibility until 1.31.0 is released!
This commit is contained in:
parent
38d644c94b
commit
8285784966
@ -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)
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user