[llvm] 5e80fc8 - [opt] Fix opt for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 19:50:41 PDT 2024


Author: Lang Hames
Date: 2024-09-12T12:50:33+10:00
New Revision: 5e80fc88f484b471ec61ac28894698a946c4fb89

URL: https://github.com/llvm/llvm-project/commit/5e80fc88f484b471ec61ac28894698a946c4fb89
DIFF: https://github.com/llvm/llvm-project/commit/5e80fc88f484b471ec61ac28894698a946c4fb89.diff

LOG: [opt] Fix opt for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.

Building with -DLLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off should not
prevent use of opt plugins.

This fix uses the approach implemented in
https://github.com/llvm/llvm-project/pull/101741.

rdar://135841478

Added: 
    

Modified: 
    llvm/tools/opt/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/tools/opt/CMakeLists.txt b/llvm/tools/opt/CMakeLists.txt
index 8d5c9fb62e5bec..6dd74ae1b7f8fe 100644
--- a/llvm/tools/opt/CMakeLists.txt
+++ b/llvm/tools/opt/CMakeLists.txt
@@ -46,9 +46,8 @@ add_llvm_tool(opt
   intrinsics_gen
   SUPPORT_PLUGINS
 
+  EXPORT_SYMBOLS
   )
 target_link_libraries(opt PRIVATE LLVMOptDriver)
 
 setup_host_tool(opt OPT opt_exe opt_target)
-
-export_executable_symbols_for_plugins(opt)


        


More information about the llvm-commits mailing list