Files
swift-mirror/cmake
Daniel Rodríguez Troitiño 55a94ec57a [CMake] MSVC does not support -fno-lto, so skip it (#86660)
Sadly MSVC doesn't seem to have a equivalent to `-fno-lto` and it does
not like `-fno-lto`, printing a warning. Pointed out after landing in
the comments of #86187.

In order to avoid the warning, skip the `-fno-lto` flag for MSVC
compilers. This means that MSVC will still suffer the problem described
in #86187 (enabling LTO in a LLVM unified build will force enabling LTO
on Swift/Swift stdlib, even if disabled explicitly with\
`SWIFT_STDLIB_ENABLE_LTO`). This was the result even after #86187, since
MSVC was ignoring the `-fno-lto` anyway.

It cannot be done with a generator expression because the resulting
string seems to be used in some context that does not support generator
expressions.
2026-01-20 17:22:00 -08:00
..