how to disable static libs for libsanitizer?

Jack Howarth
Wed Dec 5 16:35:00 GMT 2012

   On darwin, we have switched libasan in libsanitizer from mach_override to
mac function imposition. The new approach only works when libasan is a
dynamic shared library so we no longer should build the static library.
I was hoping that the simple change of...

Index: libsanitizer/
--- libsanitizer/	(revision 194224)
+++ libsanitizer/	(working copy)
@@ -81,7 +81,7 @@ unset TSAN_SUPPORTED
 case "$host" in
-  *-*-darwin*) MAC_INTERPOSE=true ;;
+  *-*-darwin*) MAC_INTERPOSE=true; AC_DISABLE_STATIC ;;
   *) MAC_INTERPOSE=false ;;

would be sufficient. However after regenerating configure, I still find
that libasan.a is still built on x86_64-apple-darwin12.
    My original inclination was to place the AC_SUBST(enable_static) in
a case statment like...

 case "$host" in
   *-*-darwin*) ;;
   *) AC_SUBST(enable_static);;

but that would move the target configury forward in
Any suggestions?

More information about the Gcc mailing list