Commit Graph

3 Commits

Author SHA1 Message Date
AJIOB 2b2344b412 MSVC: Add abstraction for runtime checks
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names.  Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior.  Add policy CMP0184 to
provide compatibility.

Fixes: #26614
2025-01-29 13:07:41 -05:00
Saleem Abdulrasool b41fab9285 Clang: populate MSVC runtime library abstraction table
!3211 overlooked populating the runtime library selection flags for
clang-cl in MSVC compatibility mode.  There is no flag that needs to be
passed, but the value is expected to be available by the generators.  We
simply provide the empty string to appease the generators without
emitting any additional flags.

Fixes: #23048
2022-04-17 21:13:44 -07:00
Martin Storsjö 6348ffb9e5 ASM: Hook up Windows-specific GNU/Clang compiler information modules
This allows building .s/.S assembly code, and makes sure that the
`-fPIC` option isn't passed to the compiler (as it errors out on
Clang and causes a loud warning on GCC).
2020-01-31 14:37:34 -05:00