[all-commits] [llvm/llvm-project] 389546: accept 'clang++ -c a.pch -o a.o' to create PCH's o...

Luboš Luňák via All-commits all-commits at lists.llvm.org
Wed Jul 22 01:23:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3895466e2c336c0797710ae35150ba1ce6bc0b96
      https://github.com/llvm/llvm-project/commit/3895466e2c336c0797710ae35150ba1ce6bc0b96
  Author: Luboš Luňák <l.lunak at centrum.cz>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M clang/lib/Driver/Types.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/Driver/pch-codegen.cpp
    M clang/test/PCH/codegen.cpp

  Log Message:
  -----------
  accept 'clang++ -c a.pch -o a.o' to create PCH's object file

This way should be the same like with a.pcm for modules.
An alternative way is 'clang++ -c empty.cpp -include-pch a.pch -o a.o
-Xclang -building-pch-with-obj', which is what clang-cl's /Yc does
internally.

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


  Commit: 54eea6127c4d77db03787b7c55765632fb9a6f1c
      https://github.com/llvm/llvm-project/commit/54eea6127c4d77db03787b7c55765632fb9a6f1c
  Author: Luboš Luňák <l.lunak at centrum.cz>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/pch-codegen.cpp

  Log Message:
  -----------
  add -fpch-codegen/debuginfo mapping to -fmodules-codegen/debuginfo

Using -fmodules-* options for PCHs is a bit confusing, so add -fpch-*
variants. Having extra options also makes it simple to do a configure
check for the feature.
Also document the options in the release notes.

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


Compare: https://github.com/llvm/llvm-project/compare/706a4353e87b...54eea6127c4d


More information about the All-commits mailing list