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/CMakeLists.txt | |
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/CMakeLists.txt')
-rw-r--r-- | llvm/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index cfbf9562f03..b91ba15f553 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -557,7 +557,7 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) # Make sure we don't get -rdynamic in every binary. For those that need it, -# use set_target_properties(target PROPERTIES ENABLE_EXPORTS 1) +# use export_executable_symbols(target). set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") include(AddLLVM) |