[libunwind] r323499 - Don't enable _LIBUNWIND_BUILD_ZERO_COST_APIS if building the SJLJ APIs

Martin Storsjo via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 25 22:50:07 PST 2018


Author: mstorsjo
Date: Thu Jan 25 22:50:07 2018
New Revision: 323499

URL: http://llvm.org/viewvc/llvm-project?rev=323499&view=rev
Log:
Don't enable _LIBUNWIND_BUILD_ZERO_COST_APIS if building the SJLJ APIs

Otherwise, a shared library build with SJLJ APIs enabled would
end up with duplicate symbols.

This didn't occur for the apple && arm case due to specifically
checking for that in the surrounding ifdef.

Differential Revision: https://reviews.llvm.org/D42555

Modified:
    libunwind/trunk/src/config.h

Modified: libunwind/trunk/src/config.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/config.h?rev=323499&r1=323498&r2=323499&view=diff
==============================================================================
--- libunwind/trunk/src/config.h (original)
+++ libunwind/trunk/src/config.h Thu Jan 25 22:50:07 2018
@@ -72,8 +72,10 @@
     (!defined(__APPLE__) && defined(__arm__)) ||                               \
     (defined(__arm64__) || defined(__aarch64__)) ||                            \
     defined(__mips__)
+#if !defined(_LIBUNWIND_BUILD_SJLJ_APIS)
 #define _LIBUNWIND_BUILD_ZERO_COST_APIS
 #endif
+#endif
 
 #if defined(__powerpc64__) && defined(_ARCH_PWR8)
 #define PPC64_HAS_VMX




More information about the cfe-commits mailing list