[all-commits] [llvm/llvm-project] 3ce78c: [clang][deps] Fix handling of -MT in module comman...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Wed Jul 13 13:36:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ce78cbd2392d7c98f97d1d424cd7ff582fc28f8
      https://github.com/llvm/llvm-project/commit/3ce78cbd2392d7c98f97d1d424cd7ff582fc28f8
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    A clang/include/clang/Basic/MakeSupport.h
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Basic/CMakeLists.txt
    A clang/lib/Basic/MakeSupport.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    M clang/test/ClangScanDeps/generate-modules-path-args.c
    M clang/tools/clang-scan-deps/ClangScanDeps.cpp

  Log Message:
  -----------
  [clang][deps] Fix handling of -MT in module command-line

Follow-up to 6626f6fec3d3, this fixes the handling of -MT
* If no targets are provided, we need to invent one since cc1 expects
  the driver to have handled it. The default is to use -o, quoting as
  necessary for a make target.
* Fix the splitting for empty string, which was incorrectly treated as
  {""} instead of {}.
* Add a way to test this behaviour in clang-scan-deps.

Differential Revision: https://reviews.llvm.org/D129607


  Commit: 904422457564b5773b5f65c48c3954cb10a9ad1c
      https://github.com/llvm/llvm-project/commit/904422457564b5773b5f65c48c3954cb10a9ad1c
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    M llvm/utils/lit/lit/util.py

  Log Message:
  -----------
  [test] Fix macOS triple check

While the inferred host triple for macOS is something like
<arch>-apple-darwin, it's also valid to have <arch>-apple-macos.
Currently that globally changes whether an SDKROOT is provided in tests,
so make this check more portable.

Differential Revision: https://reviews.llvm.org/D129684


Compare: https://github.com/llvm/llvm-project/compare/94e0f8e00100...904422457564


More information about the All-commits mailing list