embedding compile options in program

Jonathan Wakely jwakely.gcc@gmail.com
Sun Jun 9 22:36:00 GMT 2013


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



More information about the Gcc-help mailing list