[all-commits] [llvm/llvm-project] a3036b: Re-Re-land: [CodeView] Add full repro to LF_BUILDI...

Alexandre Ganea via All-commits all-commits at lists.llvm.org
Mon Aug 10 10:36:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a3036b386383f1c1e9d32c2c8dba995087959da3
      https://github.com/llvm/llvm-project/commit/a3036b386383f1c1e9d32c2c8dba995087959da3
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M clang/cmake/caches/BaremetalARM.cmake
    M clang/cmake/caches/CrossWinToARMLinux.cmake
    M clang/cmake/caches/Fuchsia-stage2.cmake
    M clang/test/CMakeLists.txt
    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
    A lld/test/COFF/pdb-relative-source-lines2.test
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    M llvm/test/DebugInfo/COFF/build-info.ll
    M llvm/test/DebugInfo/COFF/global-type-hashes.ll
    M llvm/test/DebugInfo/COFF/types-basic.ll
    M llvm/test/DebugInfo/COFF/types-data-members.ll

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

This patch adds the missing information to the LF_BUILDINFO record, which allows for rebuilding a .CPP without any external dependency but the .OBJ itself (other than the compiler).

Some external tools that we are using (Recode, Live++) are extracting the information to reproduce a build without any knowledge of the build system. The LF_BUILDINFO stores a full path to the compiler, the PWD (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 variables). 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




More information about the All-commits mailing list