mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Use different RUST_LINKER_OPTIONS for sanitizers
These appear to work for me.
This commit is contained in:
parent
3a64052099
commit
6c3ad4cae8
19
configure.ac
19
configure.ac
@ -1128,11 +1128,20 @@ dnl What's more, we need to specify them in a linker script rather than
|
||||
dnl from build.rs: these options aren't allowed in the cargo:rustc-flags
|
||||
dnl variable.
|
||||
RUST_LINKER_OPTIONS=""
|
||||
if test "x$CFLAGS_ASAN" != "x"; then
|
||||
RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -static-libasan"
|
||||
fi
|
||||
if test "x$CFLAGS_UBSAN" != "x"; then
|
||||
RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -static-libubsan"
|
||||
if test "x$have_clang" = "xyes"; then
|
||||
if test "x$CFLAGS_ASAN" != "x"; then
|
||||
RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS $CFLAGS_ASAN"
|
||||
fi
|
||||
if test "x$CFLAGS_UBSAN" != "x"; then
|
||||
RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS $CFLAGS_UBSAN"
|
||||
fi
|
||||
else
|
||||
if test "x$CFLAGS_ASAN" != "x"; then
|
||||
RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -lasan"
|
||||
fi
|
||||
if test "x$CFLAGS_UBSAN" != "x"; then
|
||||
RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -lubsan"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(RUST_LINKER_OPTIONS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user