Skip to content

Commit

Permalink
libRemarks.{so,dylib}: remove Remarks.dylib.exports
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MaskRay committed Feb 2, 2023
1 parent c294bdd commit bf07de3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions llvm/tools/remarks-shlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ if(LLVM_ENABLE_PIC)
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()

Expand Down
1 change: 0 additions & 1 deletion llvm/tools/remarks-shlib/Remarks.dylib.exports

This file was deleted.

0 comments on commit bf07de3

Please sign in to comment.