mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
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.