[all-commits] [llvm/llvm-project] a45409: [Clang] Move clang::Job::printArg to llvm::sys::pr...

Alexandre Ganea via All-commits all-commits at lists.llvm.org
Thu Jun 18 06:17:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a45409d8855a1e4538990507ef25e9b51c090193
      https://github.com/llvm/llvm-project/commit/a45409d8855a1e4538990507ef25e9b51c090193
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M clang/include/clang/Driver/Job.h
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Driver/Job.cpp
    M llvm/include/llvm/Support/Program.h
    M llvm/lib/Support/Program.cpp

  Log Message:
  -----------
  [Clang] Move clang::Job::printArg to llvm::sys::printArg. NFCI.

This patch is to support/simplify https://reviews.llvm.org/D80833


  Commit: 24eff42ba4b85eaa5429e8efe9bd2070d34ba1f7
      https://github.com/llvm/llvm-project/commit/24eff42ba4b85eaa5429e8efe9bd2070d34ba1f7
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h
    M llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h
    M llvm/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h
    M llvm/include/llvm/DebugInfo/CodeView/MergingTypeTableBuilder.h
    M llvm/include/llvm/DebugInfo/CodeView/TypeCollection.h
    M llvm/include/llvm/DebugInfo/CodeView/TypeTableCollection.h
    M llvm/lib/DebugInfo/CodeView/AppendingTypeTableBuilder.cpp
    M llvm/lib/DebugInfo/CodeView/GlobalTypeTableBuilder.cpp
    M llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
    M llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp
    M llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp

  Log Message:
  -----------
  [CodeView] Add TypeCollection::replaceType to replace type records post-merging

The API is not called in this patch. This is to simply/support https://reviews.llvm.org/D80833


  Commit: 89ea0b05207d45c145fb525df554b3b986ae379b
      https://github.com/llvm/llvm-project/commit/89ea0b05207d45c145fb525df554b3b986ae379b
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.h
    M clang/include/clang/Frontend/CompilerInvocation.h
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
    M clang/lib/Tooling/Tooling.cpp
    M clang/tools/driver/cc1_main.cpp
    M clang/tools/driver/driver.cpp
    M llvm/include/llvm/MC/MCTargetOptions.h

  Log Message:
  -----------
  [MC] Pass down argv0 & cc1 cmd-line to the back-end and store in MCTargetOptions

When targetting CodeView, the goal is to store argv0 & cc1 cmd-line in the emitted .OBJ, in order to allow a reproducer from the .OBJ alone.

This patch is to simplify https://reviews.llvm.org/D80833


  Commit: 403f9537924b8910ed4f741ed96c61f5e657915b
      https://github.com/llvm/llvm-project/commit/403f9537924b8910ed4f741ed96c61f5e657915b
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    A clang/test/CodeGen/debug-info-codeview-buildinfo.c
    M lld/COFF/PDB.cpp
    M lld/test/COFF/Inputs/pdb_lines_1_relative.yaml
    M lld/test/COFF/Inputs/pdb_lines_2_relative.yaml
    M lld/test/COFF/pdb-relative-source-lines.test
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

  Log Message:
  -----------
  [CodeView] Add full repro to LF_BUILDINFO record

This patch adds some missing information to the LF_BUILDINFO which allows for rebuilding an .OBJ without any external dependency but the .OBJ itself (other than the compiler executable).

Some tools need this information to reproduce a build without any knowledge of the build system. The LF_BUILDINFO therefore stores a full path to the compiler, the PWD (which is the CWD at program startup), a relative or absolute path to the TU, and the full CC1 command line. The command line needs to be freestanding (not depend on any environment variable). In the same way, MSVC doesn't store the provided command-line, but an expanded version (somehow their equivalent of CC1) which is also freestanding.

For more information see PR36198 and D43002.

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


Compare: https://github.com/llvm/llvm-project/compare/92d8ad02e92f...403f9537924b


More information about the All-commits mailing list