[Scons-users] Overriding the default compilation behavior / supporting new compilers

Hua Yanghao huayanghao at gmail.com
Wed Sep 27 10:12:19 EDT 2017


Dear Scons Friends,
I looked at https://bitbucket.org/scons/scons/wiki/ToolsForFools which
is a good starting point explaining how to use scons to implement
tools. However I am missing one part how scons is actually connecting
the CC=xyz-cc to the tools/xyz-cc.py file. For cross-compilation (e.g.
CC=arm-none-eabi-gcc) it just works (I assume it is using the GCC
command line options).

Assume I have a customized C compiler called xyz-cc which uses
completely different command line options to generate object files and
a customized library archiver xyz-ar for building static libraries.
Instead of making a new builder name (e.g. xyzObject(),
xyzStaticLibrary), how can I change the default behaviour of the
Object/StaticLibrary/Program builder to use my customized compilation
tool chain?

Best Regards,
Yanghao


More information about the Scons-users mailing list