From 8dcb8a6af6efa73d1d11b811af6f8b8de842be92 Mon Sep 17 00:00:00 2001 From: Rogerz Zhang Date: Sat, 19 Jan 2013 21:41:32 +0800 Subject: [PATCH] Use customized command string in scons --- tools/building.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/building.py b/tools/building.py index 8418ccd3eb..feaaec9358 100644 --- a/tools/building.py +++ b/tools/building.py @@ -113,9 +113,20 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ and rtconfig.PLATFORM == 'gcc': AddDepend('RT_USING_MINILIBC') - #env['CCCOMSTR'] = "CC $TARGET" - #env['ASCOMSTR'] = "AS $TARGET" - #env['LINKCOMSTR'] = "Link $TARGET" + # add comstr option + AddOption('--default-comstr', + dest='default_comstr', + action='store_true', + default=False, + help='use default command string') + + if not GetOption('default_comstr'): + env.Replace( + ASCOMSTR = 'AS $TARGET', + CCCOMSTR = 'CC $TARGET', + CXXCOMSTR = 'CXX $TARGET', + LINKCOMSTR = 'LINK $TARGET' + ) # board build script objs = SConscript('SConscript', variant_dir='build', duplicate=0)