libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libtool: passthru '-shared-libsan' flag


From: Dmitry Antipov
Subject: [PATCH] libtool: passthru '-shared-libsan' flag
Date: Sat, 20 May 2023 15:02:42 +0300

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

This is intented to link shared libraries against
sanitizer runtimes with Clang.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 build-aux/ltmain.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 3b76bd08..2df29a18 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5406,13 +5406,14 @@ func_mode_link ()
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -shared-libsan       Link shared libraries with 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|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
         func_quote_arg pretty "$arg"
        arg=$func_quote_arg_result
         func_append compile_command " $arg"
-- 
2.40.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]