Commit acfb54bb authored by Raul Tambre's avatar Raul Tambre
Browse files

Clang: Support WIN32_EXECUTABLE

Fixes #21613.
parent 8c9c338e
Pipeline #206379 waiting for manual action with stages
in 19 minutes and 18 seconds
clang-win32-subsystem
---------------------
* :prop_tgt:`WIN32_EXECUTABLE` now works on Windows with Clang.
......@@ -71,6 +71,9 @@ macro(__windows_compiler_clang_gnu lang)
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> -fuse-ld=lld-link -nostartfiles -nostdlib <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Xlinker /implib:<TARGET_IMPLIB> -Xlinker /pdb:<TARGET_PDB> -Xlinker /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
set(CMAKE_CREATE_WIN32_EXE "-Xlinker /subsystem:windows")
set(CMAKE_CREATE_CONSOLE_EXE "-Xlinker /subsystem:console")
if(NOT "${lang}" STREQUAL "ASM")
set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmt)
set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL -D_DLL -D_MT -Xclang --dependent-lib=msvcrt)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment