Skip to content

Commit

Permalink
Add symbol visibility macros to abi-breaking.h.cmake (#110898)
Browse files Browse the repository at this point in the history
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@redhat.com>
  • Loading branch information
fsfod and tstellar authored Oct 9, 2024
1 parent fb2960a commit 3be6916
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/include/llvm/Config/abi-breaking.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3be6916

Please sign in to comment.