summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-03-18 20:09:13 +0000
committerReid Kleckner <reid@kleckner.net>2015-03-18 20:09:13 +0000
commit3e8c445c9695bde9856ba912841cb3ee4901e607 (patch)
tree8a18fd615e5a55758bad1f4796e5469a286d3904 /llvm/tools/opt
parent3d86b235119e4bd90c944228803c2d6fa622f3f8 (diff)
downloadbcm5719-llvm-3e8c445c9695bde9856ba912841cb3ee4901e607.tar.gz
bcm5719-llvm-3e8c445c9695bde9856ba912841cb3ee4901e607.zip
CMake: Disable ENABLE_EXPORTS for executables with MSVC
The MSVC linker won't produce a .lib file for an executable that doesn't export anything, and LLVM doesn't maintain dllexport annotations or .def files listing all C++ symbols. It also doesn't support exporting all symbols, like binutils ld. CMake 3.2 changed the Ninja generator to list both the .exe and .lib files as outputs of executable build targets. Ninja would always re-link executables with ENABLE_EXPORTS because the .lib output file was not present, and therefore the target was out of date. llvm-svn: 232662
Diffstat (limited to 'llvm/tools/opt')
-rw-r--r--llvm/tools/opt/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/opt/CMakeLists.txt b/llvm/tools/opt/CMakeLists.txt
index 12dc4f0a9f5..5f825220cc8 100644
--- a/llvm/tools/opt/CMakeLists.txt
+++ b/llvm/tools/opt/CMakeLists.txt
@@ -31,7 +31,7 @@ add_llvm_tool(opt
PrintSCC.cpp
opt.cpp
)
-set_target_properties(opt PROPERTIES ENABLE_EXPORTS 1)
+export_executable_symbols(opt)
if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
target_link_libraries(opt Polly)
OpenPOWER on IntegriCloud