diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-03 00:09:19 +0300 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-03 00:09:19 +0300 |
commit | 2d2ed1cc472a87a14a0f955ae716ebb63de15016 (patch) | |
tree | aa63dec4c089273a8a46e1b621b6699241f1298c /libcxx/lib/CMakeLists.txt | |
parent | 11c0c53367efbcc8d54ff26c562e8b7891ebc1b1 (diff) |
build: make cross-compiling to Windows work on Linux
Disable the manifest bundling on Windows when cross-compiling on
not-Windows. With this, it is possible to execute the link command from
CMake which will use cmake to invoke the manifest tool to generate a
manifest and pass that to the linker.
llvm-svn: 290836
Diffstat (limited to 'libcxx/lib/CMakeLists.txt')
-rw-r--r-- | libcxx/lib/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt index 6beb59feec41..53f93aed9b91 100644 --- a/libcxx/lib/CMakeLists.txt +++ b/libcxx/lib/CMakeLists.txt @@ -181,6 +181,13 @@ if (LIBCXX_ENABLE_SHARED) SOVERSION "${LIBCXX_ABI_VERSION}" ) list(APPEND LIBCXX_TARGETS "cxx_shared") + if(WIN32 AND NOT MINGW AND NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + # Since we most likely do not have a mt.exe replacement, disable the + # manifest bundling. This allows a normal cmake invocation to pass which + # will attempt to use the manifest tool to generate the bundled manifest + set_target_properties(cxx_shared PROPERTIES + APPEND_STRING PROPERTY LINK_FLAGS " /MANIFEST:NO") + endif() endif() # Build the static library. |