[PATCH] D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 07:24:08 PDT 2023

hans added a comment.

In D150688#4349699 <https://reviews.llvm.org/D150688#4349699>, @mstorsjo wrote:

> In D150688#4349390 <https://reviews.llvm.org/D150688#4349390>, @mstorsjo wrote:
>> In D150688#4349022 <https://reviews.llvm.org/D150688#4349022>, @hans wrote:
>>> compiler-rt has seems to have its own thing in https://github.com/llvm/llvm-project/blob/llvmorg-16.0.3/compiler-rt/CMakeLists.txt#L398
>> Oh, I see. This seems to look for the literal form `/MD`, but after the CMake update, CMake seems to set the option in the form `-MD`, so if this pattern is updated to check for both `/` and `-`, this might start working as expected.
> Although, the new policy does place the flag in a different separate cmake variable, so it’s quite possible that it isn’t enough. In any case, with the new policy, the right thing to do is to set the variable (or target property) for deciding what CRT to use, not to manually exchange flags in the variables.

Yes, I tried changing those regexes but it didn't help (https://github.com/llvm/llvm-project/issues/62719#issuecomment-1551493063).

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list