Remarks.exports is only intended for NOT (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB)
builds.
For (unintended use case) BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB (the latter
is used by some Linux distros), the library defines just one symbol on ELF.
There is no need to use a version script.
I think this is a more proper solution than D139932 and fixes `symbol not
defined` errors after lld default change D135402.
libremarks.cpp
)
- if (LLVM_LINK_LLVM_DYLIB)
- set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.dylib.exports)
- else()
+ if (NOT (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB))
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports)
endif()
+++ /dev/null
-LLVMRemarkVersion