[cfe-dev] Proposed new GCC option --record-gcc-command-line

Fāng-ruì Sòng via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 4 22:56:51 PST 2020


Copying the example from
https://gcc.gnu.org/ml/gcc-patches/2020-03/msg00230.html here

[egeyar at localhost save-commandline]$ g++ main.c
--record-gcc-command-line -frecord-gcc-switches

[egeyar at localhost save-commandline]$ readelf -p .GCC.command.line a.out

String dump of section '.GCC.command.line':

  [     0]  10.0.0 20191025 (experimental) : g++ main.c
--record-gcc-command-line -frecord-gcc-switches

  [    5c]  -D_GNU_SOURCE
  [    6a]  main.c
  [    71]  -mtune=generic
  [    80]  -march=x86-64
  [    8e]  --record-gcc-command-line /tmp/ccgC4ZtS.cmdline



I know that we've already implemented -frecord-command-line and
-frecord-gcc-switches (https://reviews.llvm.org/D54489). It looks like
we may have an opinion on the section name and probably also the
option name.

Making a reply without a subscription may be difficult. You may need
to download [Raw text] and import the message to a Maildir/mailbox.


More information about the cfe-dev mailing list