Skip to content

Commit

Permalink
[libc++] Fix how we pass /MANIFEST flag on Windows without clang-cl
Browse files Browse the repository at this point in the history
If we're compiling with Clang (not clang-cl) on Windows, we need
to use -Xlinker to pass the /MANIFEST option.

Fixes llvm#96430
  • Loading branch information
ldionne committed Jun 27, 2024
1 parent eeb9316 commit 71f34e5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libcxx/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,13 @@ if (LIBCXX_ENABLE_SHARED)
# 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")
if (${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} STREQUAL "MSVC")
set_target_properties(cxx_shared PROPERTIES
APPEND_STRING PROPERTY LINK_FLAGS " /MANIFEST:NO")
else()
set_target_properties(cxx_shared PROPERTIES
APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker /MANIFEST:NO")
endif()
endif()
endif()

Expand Down

0 comments on commit 71f34e5

Please sign in to comment.