summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-02 21:09:19 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-02 21:09:19 +0000
commit2d2ed1cc472a87a14a0f955ae716ebb63de15016 (patch)
treeaa63dec4c089273a8a46e1b621b6699241f1298c /libcxx
parent11c0c53367efbcc8d54ff26c562e8b7891ebc1b1 (diff)
downloadbcm5719-llvm-2d2ed1cc472a87a14a0f955ae716ebb63de15016.tar.gz
bcm5719-llvm-2d2ed1cc472a87a14a0f955ae716ebb63de15016.zip
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')
-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 6beb59feec4..53f93aed9b9 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.
OpenPOWER on IntegriCloud