[PATCH] D155431: [CMake] Clean up old code for handling MSVC runtime setting the old way

Yury Bura via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 04:12:16 PDT 2023


yurybura added a comment.

> I guess we could consider readding a couple lines in compiler-rt to strip that out though. But we don't really in general want to support users manually injecting conflicting CRT flags via the cmake flags. What do others think here, @hans @phosek?

If we talk about CRT flags, then I can partially agree. By default CMake defines `MultiThreaded$<$<CONFIG:Debug>:Debug>DLL` (`/MDd` for `Debug` configuration). The Clang project can build with default flags without special handling. The `compiler-rt` project overwrites specified flags with `MultiThreaded` (`/MT` for `Debug` configuration). CMake doesn't provide any support for remove obsolete flags or warnings or otehr way to inform somehove about using about conflicted flags. At least for backward compatibility better to leave code to remove unsupported flags.

The main reason of the failure is  `/D_DEBUG' is specified. CMake doesn't provide custom variables to handle this... In either case, this definition is checked in the source code and causes the build to fail.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155431/new/

https://reviews.llvm.org/D155431



More information about the llvm-commits mailing list