Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-03 00:09:19 +0300
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-03 00:09:19 +0300
commit2d2ed1cc472a87a14a0f955ae716ebb63de15016 (patch)
treeaa63dec4c089273a8a46e1b621b6699241f1298c
parent11c0c53367efbcc8d54ff26c562e8b7891ebc1b1 (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
-rw-r--r--libcxx/lib/CMakeLists.txt7
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.