[all-commits] [llvm/llvm-project] 7a72dc: [clang][deps] Set -disable-free for module compila...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Wed Jun 8 11:11:16 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a72dca74a27f1f6198cfabb064dc43274ee005d
      https://github.com/llvm/llvm-project/commit/7a72dca74a27f1f6198cfabb064dc43274ee005d
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
    A clang/test/ClangScanDeps/modules-disable-free.c

  Log Message:
  -----------
  [clang][deps] Set -disable-free for module compilations

The command-line arguments for module builds are cc1 commands, so they
do not implicitly set -disable-free like a driver invocation, and
Tooling will disable it for the scanning instance itself. Set
-disable-free explicitly so that separate invocations for building
modules will not pay for freeing memory unnecessarily.

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


  Commit: 835fcf2aa5127bf99a1e6397c72153f00a0497b2
      https://github.com/llvm/llvm-project/commit/835fcf2aa5127bf99a1e6397c72153f00a0497b2
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

  Log Message:
  -----------
  [clang][deps] Make order of module dependencies deterministic

This fixes the underlying module dependencies, which had a
non-deterministic order, which was also visible in the order of calls to
DependencyConsumer methods. This was not directly observable in
the clang-scan-deps utility, because it was previously seeing a sorted
order from std::map in DependencyScanningTool. However, the underlying
API previously created a likely issue for any other clients. Note: if
you only apply the change from DependencyScanningTool, you can see the
issue in clang-scan-deps, and existing tests will fail
non-deterministicaly.

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


Compare: https://github.com/llvm/llvm-project/compare/40f35cef894a...835fcf2aa512


More information about the All-commits mailing list