[llvm] r288754 - Introduces cmake option `LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING`

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 17:23:05 PST 2016


Author: mehdi_amini
Date: Mon Dec  5 19:23:04 2016
New Revision: 288754

URL: http://llvm.org/viewvc/llvm-project?rev=288754&view=rev
Log:
Introduces cmake option `LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING`

Summary:
We recently introduced a feature that enforce at link-time that the
LLVM headers used by a clients are matching the ABI setting of the
LLVM library linked to.

However for clients that are using only headers from ADT and promise
they won't call into LLVM, this is forcing to link libSupport. This
new flag is intended to provide a way to configure LLVM with this
promise for such client.

Reviewers: bob.wilson, compnerd

Subscribers: mgorny, llvm-commits

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

Modified:
    llvm/trunk/CMakeLists.txt
    llvm/trunk/include/llvm/Config/abi-breaking.h.cmake

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=288754&r1=288753&r2=288754&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Mon Dec  5 19:23:04 2016
@@ -414,6 +414,9 @@ option(LLVM_ENABLE_EXPENSIVE_CHECKS "Ena
 set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
   "Enable abi-breaking checks.  Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")
 
+option(LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
+  "Disable abi-breaking checks mismatch detection at link-tim." OFF)
+
 option(LLVM_FORCE_USE_OLD_HOST_TOOLCHAIN
        "Set to ON to force using an old, unsupported host toolchain." OFF)
 

Modified: llvm/trunk/include/llvm/Config/abi-breaking.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/abi-breaking.h.cmake?rev=288754&r1=288753&r2=288754&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/abi-breaking.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/abi-breaking.h.cmake Mon Dec  5 19:23:04 2016
@@ -15,6 +15,11 @@
 /* Define to enable checks that alter the LLVM C++ ABI */
 #cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS
 
+/* Define to disable the link-time checking of mismatch for
+   LLVM_ENABLE_ABI_BREAKING_CHECKS */
+#cmakedefine01 LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
+#if !LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
+
 // ABI_BREAKING_CHECKS protection: provides link-time failure when clients build
 // mismatch with LLVM
 #if defined(_MSC_VER)
@@ -38,4 +43,6 @@ __attribute__((weak, visibility ("hidden
 }
 #endif // _MSC_VER
 
+#endif // LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
+
 #endif




More information about the llvm-commits mailing list