This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: embedding compile options in program
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Ilya Shlyakhter <ilya_shl at alum dot mit dot edu>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Sun, 9 Jun 2013 23:36:07 +0100
- Subject: Re: embedding compile options in program
- References: <CACfYvRZGs=qfHuWBBoFV=S8xOraU_EL3CG2RK7siKob2c2J2oA at mail dot gmail dot com>
On 9 June 2013 23:29, Ilya Shlyakhter wrote:
> Is there a conditional define that expands to a string of the full
> gcc command-line used to compile the given .c/.cc file? I'd like to
> embed in the executable the exact compilation options used to build
> it.
No, but see the -grecord-gcc-switches option:
http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-grecord_002dgcc_002dswitches-564