]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: passthru '-shared-libsan' and '-static-libsan' flags
authorDmitry Antipov <dmantipov@yandex.ru>
Sun, 21 May 2023 17:28:22 +0000 (20:28 +0300)
committerMike Frysinger <vapier@gentoo.org>
Sun, 14 Jan 2024 04:49:08 +0000 (23:49 -0500)
This is intented to link against shared and static sanitizer
runtimes with Clang.

* build-aux/ltmain.in: Pass '-shared-libsan' and '-static-libsan'
flags when linking.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
build-aux/ltmain.in

index fc83f338ec499a7f42ce425f3dfb92454c859213..9239047c3ab85247cded07da20338e9894ae6ab3 100644 (file)
@@ -5406,13 +5406,16 @@ func_mode_link ()
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -shared-libsan       Link with shared sanitizer runtimes (Clang)
+      # -static-libsan       Link with static sanitizer runtimes (Clang)
       # -fuse-ld=*           Linker select flags for GCC
       # -Wa,*                Pass flags directly to the assembler
       # -Werror, -Werror=*   Report (specified) warnings as errors
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
+      -specs=*|-fsanitize=*|-shared-libsan|-static-libsan|-fuse-ld=*|-Wa,*| \
+      -Werror|-Werror=*)
         func_quote_arg pretty "$arg"
        arg=$func_quote_arg_result
         func_append compile_command " $arg"