[Scons-users] recording compilation commands with scons

Gary Oberbrunner garyo at oberbrunner.com
Tue Apr 23 08:59:29 EDT 2013


Yes, that should work. Alternatively you could make wrapper scripts for
your compiler and linker and use those as $CXX/$SHCXX/$CC/$LINK/$SHLINK;
the wrapper scripts could record the commands they run.


On Tue, Apr 23, 2013 at 8:28 AM, Francis Bolduc <fbolduc at gmail.com> wrote:


> One way would be to change the C++ compile command into something else:

>

> This is the default I believe.

> env['SHCXXCOM'] = '$SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS

> $_CCCOMCOM $SOURCES'

>

> You could change it to be a list... think.. have not tried..

> env['SHCXXCOM'] = ['$SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS

> $_CCCOMCOM $SOURCES', 'echo $SOURCES']

>

>

> --

> Francis Bolduc, B.Sc.

>

>

> On Tue, Apr 23, 2013 at 5:47 AM, Handa, Ramneek <Ramneek.Handa at sc.com>

> wrote:

> > Hi Folks,

> >

> > I work on a large repository which is divided into modules and I would

> > like to record the compilation triggered by scons in a format specified

> by

> > llvm.

> >

> > http://clang.llvm.org/docs/JSONCompilationDatabase.html

> >

> >

> >

> > Is there a way to write a hook in scons to get the information like

> source

> > filename and the exact C++ options being used to compile the file?

> >

> >

> >

> > Regards,

> >

> > Ramneek

> >

> >

> > This email and any attachments are confidential and may also be

> privileged.

> > If you are not the intended recipient, please delete all copies and

> notify

> > the sender immediately. You may wish to refer to the incorporation

> details

> > of Standard Chartered PLC, Standard Chartered Bank and their

> subsidiaries at

> > http://www.standardchartered.com/en/incorporation-details.html.

> >

> > _______________________________________________

> > Scons-users mailing list

> > Scons-users at scons.org

> > http://four.pairlist.net/mailman/listinfo/scons-users

> >

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>




--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130423/bc2c9d77/attachment.htm>


More information about the Scons-users mailing list