diff options
author | Alex Crichton <alex@alexcrichton.com> | 2018-10-01 22:50:08 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2018-10-01 22:50:08 -0700 |
commit | 6ebb2c46d5eae7bae8d827fdc68d3ed58b16e95a (patch) | |
tree | 3cd20abb204b6505894d6d9ab00391ee13c0848a /configure.ac | |
parent | 3dca87e1f98adcdffb962de381d1e5d5410f3d54 (diff) | |
download | tor-6ebb2c46d5eae7bae8d827fdc68d3ed58b16e95a.tar.gz tor-6ebb2c46d5eae7bae8d827fdc68d3ed58b16e95a.zip |
Remove the `link_rust.sh.in` script
This is no longer necessary with upstream rust-lang/rust changes as well
as some local tweaks. Namely:
* The `-fsanitize=address`-style options are now passed via `-C
link-args` through `RUSTFLAGS`. This obviates the need for the shell
script.
* The `-C default-linker-libraries`, disabling `-nodefaultlibs`, is
passed through `RUSTFLAGS`, which is necessary to ensure that
`-fsanitize=address` links correctly.
* The `-C linker` option is passed to ensure we're using the same C
compiler as normal C code, although it has a bit of hackery to only
get the `gcc` out of `gcc -std=c99`
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index dbeba512ca..ef8bb4e351 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 $CFLAGS_ASAN" + RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_ASAN" fi if test "x$CFLAGS_UBSAN" != "x"; then - RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS $CFLAGS_UBSAN" + RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=$CFLAGS_UBSAN" fi else if test "x$CFLAGS_ASAN" != "x"; then - RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -lasan" + RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=address" fi if test "x$CFLAGS_UBSAN" != "x"; then - RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -lubsan" + RUST_LINKER_OPTIONS="$RUST_LINKER_OPTIONS -Clink-arg=-fsanitize=undefined" fi fi AC_SUBST(RUST_LINKER_OPTIONS) @@ -2416,7 +2416,6 @@ AC_CONFIG_FILES([ Doxyfile Makefile config.rust - link_rust.sh contrib/dist/suse/tor.sh contrib/operator-tools/tor.logrotate contrib/dist/tor.sh |