[llvm-branch-commits] [llvm] 287c362 - libRemarks.{so, dylib}: remove Remarks.dylib.exports

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 9 05:01:02 PST 2023


Author: Fangrui Song
Date: 2023-02-09T13:55:21+01:00
New Revision: 287c362d1f7ee8cc88eb4d5c96f2ecb0ee971fe6

URL: https://github.com/llvm/llvm-project/commit/287c362d1f7ee8cc88eb4d5c96f2ecb0ee971fe6
DIFF: https://github.com/llvm/llvm-project/commit/287c362d1f7ee8cc88eb4d5c96f2ecb0ee971fe6.diff

LOG: libRemarks.{so,dylib}: remove Remarks.dylib.exports

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.

(cherry picked from commit bf07de38b05e4c952beb4009aa15060d0e4f7cc7)

Added: 
    

Modified: 
    llvm/tools/remarks-shlib/CMakeLists.txt

Removed: 
    llvm/tools/remarks-shlib/Remarks.dylib.exports


################################################################################
diff  --git a/llvm/tools/remarks-shlib/CMakeLists.txt b/llvm/tools/remarks-shlib/CMakeLists.txt
index 2f108a42c9aab..bc4bd67e2c9ec 100644
--- a/llvm/tools/remarks-shlib/CMakeLists.txt
+++ b/llvm/tools/remarks-shlib/CMakeLists.txt
@@ -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()
 

diff  --git a/llvm/tools/remarks-shlib/Remarks.dylib.exports b/llvm/tools/remarks-shlib/Remarks.dylib.exports
deleted file mode 100644
index 0c2a3c38c78ce..0000000000000
--- a/llvm/tools/remarks-shlib/Remarks.dylib.exports
+++ /dev/null
@@ -1 +0,0 @@
-LLVMRemarkVersion


        


More information about the llvm-branch-commits mailing list