Win32: Fix compilation with standalone LLVM

The /clang: suffix passed to Clang-CL was accidentally also passed to
the regular standalone Clang, which caused compilation to fail.  We now
pass /W3 to Clang-CL, which it interprets as -Wall.

The _CRT_SECURE_NO_WARNINGS macro is now defined for both Clang and
Clang-CL.

The /entry: flag passed to link.exe is now also passed to lld-link,
letting the windows subsystem tests and examples link.

Fixes #1807.
Closes #1824.
Closes #1874.

(cherry picked from commit 061a0263a9)
This commit is contained in:
Camilla Löwy
2021-04-12 20:56:53 +02:00
parent 3cded29c2f
commit 5dd6716ee9
4 changed files with 23 additions and 16 deletions
+1
View File
@@ -120,6 +120,7 @@ information on what to include when reporting a bug.
- [Win32] Bugfix: `USE_MSVC_RUNTIME_LIBRARY_DLL` had no effect on CMake 3.15 or
later (#1783,#1796)
- [Win32] Bugfix: Compilation with LLVM for Windows failed (#1807,#1824,#1874)
## Contact