[llvm] 3be6916 - Add symbol visibility macros to abi-breaking.h.cmake (#110898)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 23:41:31 PDT 2024


Author: Thomas Fransham
Date: 2024-10-09T09:41:28+03:00
New Revision: 3be691651a2143f23bcf8f2704e55b01bbaa2550

URL: https://github.com/llvm/llvm-project/commit/3be691651a2143f23bcf8f2704e55b01bbaa2550
DIFF: https://github.com/llvm/llvm-project/commit/3be691651a2143f23bcf8f2704e55b01bbaa2550.diff

LOG: Add symbol visibility macros to abi-breaking.h.cmake (#110898)

Annotating these symbols will fix missing symbols errors for Bugpoint
when when the default symbol visibility is set to hidden for LLVM.

This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on
window.

Co-authored-by: Tom Stellard <tstellar at redhat.com>

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Config/abi-breaking.h.cmake b/llvm/include/llvm/Config/abi-breaking.h.cmake
index 2d27e02b1d5457..81495f0569752c 100644
--- a/llvm/include/llvm/Config/abi-breaking.h.cmake
+++ b/llvm/include/llvm/Config/abi-breaking.h.cmake
@@ -12,6 +12,8 @@
 #ifndef LLVM_ABI_BREAKING_CHECKS_H
 #define LLVM_ABI_BREAKING_CHECKS_H
 
+#include "llvm/Support/Compiler.h"
+
 /* Define to enable checks that alter the LLVM C++ ABI */
 #cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS
 
@@ -43,12 +45,12 @@
 #endif
 namespace llvm {
 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
-extern int EnableABIBreakingChecks;
+LLVM_ABI extern int EnableABIBreakingChecks;
 LLVM_HIDDEN_VISIBILITY
 __attribute__((weak)) int *VerifyEnableABIBreakingChecks =
     &EnableABIBreakingChecks;
 #else
-extern int DisableABIBreakingChecks;
+LLVM_ABI extern int DisableABIBreakingChecks;
 LLVM_HIDDEN_VISIBILITY
 __attribute__((weak)) int *VerifyDisableABIBreakingChecks =
     &DisableABIBreakingChecks;


        


More information about the llvm-commits mailing list