Skip to content

Commit 6a94699

Browse files
committed
Do export symbols when LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is on.
Summary: In D76527, we stopped exporting symbols from clang, opt and llc unless the `LLVM_ENABLE_PLUGINS` cmake variable is true (which causes clang's own plugin collection to be built). But another reasonable build configuration is to ask clang to export its symbols for out-of-tree plugins to use, without building the in-tree ones. That is, you might set `LLVM_EXPORT_SYMBOLS_FOR_PLUGINS` without also setting `LLVM_ENABLE_PLUGINS` (at least if you're using MSVC, where you need to ask explicitly for the symbols to be exported). In that situation, the symbols should still be exported, but after D76527, they weren't being. Reviewers: efriedma, john.brawn Reviewed By: efriedma, john.brawn Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76760
1 parent 37b9cc8 commit 6a94699

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ endfunction()
10311031

10321032
# Export symbols if LLVM plugins are enabled.
10331033
function(export_executable_symbols_for_plugins target)
1034-
if(LLVM_ENABLE_PLUGINS)
1034+
if(LLVM_ENABLE_PLUGINS OR LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
10351035
export_executable_symbols(${target})
10361036
endif()
10371037
endfunction()

0 commit comments

Comments
 (0)