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

Tobias Hieta via All-commits all-commits at lists.llvm.org
Mon Oct 2 09:15:38 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a2d7dae6ef233367ecd53d751b0630c84811430
      https://github.com/llvm/llvm-project/commit/0a2d7dae6ef233367ecd53d751b0630c84811430
  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.

(cherry picked from commit 7bc09a471fbc274d8632d1379d4134bec63fecc4)


  Commit: 71be0aafe357e2a9a40ed0628a21ccbe0a6b8813
      https://github.com/llvm/llvm-project/commit/71be0aafe357e2a9a40ed0628a21ccbe0a6b8813
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/Common/Filesystem.cpp

  Log Message:
  -----------
  [NFC] clang-format lld/COFF/Driver.cpp and lld/Common/Filesystem.cpp

In order to reduce noise for a MR.

(cherry picked from commit a5e280bc6bda10607e0e7c864e4d23fac02d00aa)


  Commit: 6a5be8e95b43fbe213e51a23ef8d0f828e6839a2
      https://github.com/llvm/llvm-project/commit/6a5be8e95b43fbe213e51a23ef8d0f828e6839a2
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/test/COFF/print-search-paths.s

  Log Message:
  -----------
  [LLD] [COFF] Clarify -print-search-path for the empty string element (#67856)

Also switch the test case to use -NEXT to strictly match all lines.

(cherry picked from commit 7d7d9e462a8983d71e01786c9ad61a976ff10e8a)


  Commit: b338a2830a2cc547566bc4bccf60ae78ed266299
      https://github.com/llvm/llvm-project/commit/b338a2830a2cc547566bc4bccf60ae78ed266299
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/test/COFF/print-search-paths.s

  Log Message:
  -----------
  [LLD] [COFF] Restore the current dir as the first entry in the search path (#67857)

Before af744f0b84e2b6410be65277068b9033124c73b2, the first entry
among the search paths was the empty string, indicating searching
in (or starting from) the current directory. After
af744f0b84e2b6410be65277068b9033124c73b2, the toolchain/clang
specific lib directories were added at the head of the search path.

This would cause lookups of literal file names or relative paths
to match paths in the toolchain, if there are coincidental files
with similar names there, even if they would be find in the current
directory as well.

Change addClangLibSearchPaths to append to the list like all other
operations on searchPaths - but move the invocation of the
function to the right place in the sequence.

This fixes #67779.

(cherry picked from commit f906fd53b5ce12f07aec394ddf900c7f9f583405)


  Commit: f6cf58eed9737cb8718465c4fb6917ca854b1bc3
      https://github.com/llvm/llvm-project/commit/f6cf58eed9737cb8718465c4fb6917ca854b1bc3
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/MinGW.cpp
    A clang/test/Driver/mingw-linker-options.c

  Log Message:
  -----------
  [clang] [MinGW] Tolerate mingw specific linker options during compilation (#67891)

Prior to 591c4b64b3650884c2c68eb47d755ebb62981b99, the mingw specific
linker options -mthreads, -mconsole, -mwindows and -mdll would be
tolerated also at compile time, but generating a warning about being
unused.

After that commit, they were marked as target specific, which means that
it's an error if they're unused (which would consider them used for the
wrong target). These specific options are only relevant when linking,
but we want to tolerate them at compile time too, like before.

This was fixed for -mthreads in
a79995ca6004082774a87f7a58ab6be5343364b7, while the other options didn't
seem to be commonly used during compilation.

After the 17.x release, we've got more reports about this actually being
an issue, in #64464. Therefore, apply the same fix for them; marking
them as tolerated for mingw targets during compilation, even if they're
unused. Also add a testcase for -mthreads which was already handled.

Thus, this fixes #64464.

(cherry picked from commit e39de2b8862ae43459324da84279366997265078)

Adapted from the original commit; the test in the original commit
depended on f39c399d9d15efe8309d8aa3d0ecf62205e6c474. Instead of
using -###, when we're not actually using the printed output of
-###, instead use -fdriver-only.


  Commit: 03f797b51df664970322e80da6c4149b11dcad39
      https://github.com/llvm/llvm-project/commit/03f797b51df664970322e80da6c4149b11dcad39
  Author: Tobias Hieta <tobias at hieta.se>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M .github/workflows/llvm-tests.yml

  Log Message:
  -----------
  [workflow] Fix abi checker in llvm-tests. Same fix as in 99fb0af80d16b0ff886f032441392219e1cac452 (#67957)

Fixes #67651


Compare: https://github.com/llvm/llvm-project/compare/098e653a5bed...03f797b51df6


More information about the All-commits mailing list