[PATCH] D80833: [CodeView] Add full repro to LF_BUILDINFO record

Alexandre Ganea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 13:06:46 PDT 2020


aganea created this revision.
aganea added reviewers: hans, amccarth, thakis, mstorsjo, akhuang.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added projects: clang, LLVM.

This patch adds some missing information to the `LF_BUILDINFO` 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 <https://www.indefiant.com/>, Live++ <https://liveplusplus.tech/>) are extracting the 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, 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 <https://reviews.llvm.org/D43002>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80833

Files:
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Frontend/CompilerInvocation.h
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
  clang/test/CodeGen/debug-info-codeview-buildinfo.c
  clang/tools/driver/cc1_main.cpp
  clang/tools/driver/driver.cpp
  llvm/include/llvm/MC/MCTargetOptions.h
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80833.267331.patch
Type: text/x-patch
Size: 10020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200529/fba3de24/attachment-0001.bin>


More information about the cfe-commits mailing list