[libcxx] r290836 - build: make cross-compiling to Windows work on Linux
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 2 13:09:19 PST 2017
Author: compnerd
Date: Mon Jan 2 15:09:19 2017
New Revision: 290836
URL: http://llvm.org/viewvc/llvm-project?rev=290836&view=rev
Log:
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.
Modified:
libcxx/trunk/lib/CMakeLists.txt
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=290836&r1=290835&r2=290836&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Mon Jan 2 15:09:19 2017
@@ -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.
More information about the cfe-commits
mailing list