[all-commits] [llvm/llvm-project] 7bc09a: [compiler-rt] Reinstate removal of CRT choice flag...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Oct 2 03:22:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7bc09a471fbc274d8632d1379d4134bec63fecc4
      https://github.com/llvm/llvm-project/commit/7bc09a471fbc274d8632d1379d4134bec63fecc4
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M compiler-rt/CMakeLists.txt

  Log Message:
  -----------
  [compiler-rt] Reinstate removal of CRT choice flags from CMAKE_*_FLAGS* (#67935)

This reverts one part of commit
9f4dfcb795bb0ecf9944553f49371164801cd83f, with a modified comment added
about the code.

Ideally, this would only be reinstated temporarily - but given the
situation in vcpkg, it looks likely that they would keep passing the
duplicate options for quite some time. The conflicting CRT choice
usually are benign but only would cause warnings about one option
overriding the other, if passing e.g. "/MDd /MT".

However when vcpkg currently sets these options in CMAKE_*_FLAGS_DEBUG,
it passes the redundant option /D_DEBUG; thus the compiler finally ends
up with e.g. "/D_DEBUG /MDd /MT", which has the effect of defining
_DEBUG while using a release mode CRT, which allegedly breaks the build.

There's a PR up for removing this redundant /D_DEBUG option in vcpkg in
https://github.com/microsoft/vcpkg/pull/34123. With that in place, this
change wouldn't be strictly needed.




More information about the All-commits mailing list