diff options
| author | Reid Kleckner <reid@kleckner.net> | 2015-03-18 20:09:13 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2015-03-18 20:09:13 +0000 |
| commit | 3e8c445c9695bde9856ba912841cb3ee4901e607 (patch) | |
| tree | 8a18fd615e5a55758bad1f4796e5469a286d3904 /llvm/tools/llvm-stress | |
| parent | 3d86b235119e4bd90c944228803c2d6fa622f3f8 (diff) | |
| download | bcm5719-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/llvm-stress')
| -rw-r--r-- | llvm/tools/llvm-stress/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-stress/CMakeLists.txt b/llvm/tools/llvm-stress/CMakeLists.txt index 106ced14194..d5c10e13f5b 100644 --- a/llvm/tools/llvm-stress/CMakeLists.txt +++ b/llvm/tools/llvm-stress/CMakeLists.txt @@ -7,4 +7,4 @@ set(LLVM_LINK_COMPONENTS add_llvm_tool(llvm-stress llvm-stress.cpp ) -set_target_properties(llvm-stress PROPERTIES ENABLE_EXPORTS 1) +export_executable_symbols(llvm-stress) |

