Skip to content

Commit 1ab46e5

Browse files
[libc] update LibcTableGenUtil for LLVM_LINK_LLVM_DYLIB
This library is linked into libc-hdrgen, which is compiled with DISABLE_LLVM_LINK_LLVM_DYLIB. This option avoids linking with libLLVM.so when LLVM_LINK_LLVM_DYLIB is specified. Unfortunately, this can cause wierd linkage errors where symbols are defined multiple times, with one definition coming from static linkage and another definition coming from libLLVM.so. This is usually apparent as a link error with options defined multiple times. This patch adds DISABLE_LLVM_LINK_LLVM_DYLIB to this library, to get consistent linkage of libc-hdrgen. Differential Revision: https://reviews.llvm.org/D145839
1 parent b1fdcd5 commit 1ab46e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libc/utils/LibcTableGenUtil/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ add_llvm_library(
22
LibcTableGenUtil
33
APIIndexer.cpp
44
APIIndexer.h
5+
DISABLE_LLVM_LINK_LLVM_DYLIB
56
LINK_COMPONENTS Support TableGen
67
)
78
target_include_directories(LibcTableGenUtil PUBLIC ${LIBC_SOURCE_DIR})

0 commit comments

Comments
 (0)