1from building import * 2from gcc import * 3import os 4Import('rtconfig') 5 6cwd = GetCurrentDir() 7src = ['cxx_crt_init.c', 'cxx_crt.cpp'] 8CPPPATH = [cwd] 9CXXFLAGS = '' 10 11if rtconfig.PLATFORM in GetGCCLikePLATFORM() and not GetDepend('RT_USING_CPP_EXCEPTIONS'): 12 CXXFLAGS += ' -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections' # reduce resource consumptions 13 14group = DefineGroup('CPP', src, depend=['RT_USING_CPLUSPLUS'], CPPPATH=CPPPATH, CXXFLAGS=CXXFLAGS) 15 16list = os.listdir(cwd) 17for d in list: 18 path = os.path.join(cwd, d) 19 if os.path.isfile(os.path.join(path, 'SConscript')): 20 group = group + SConscript(os.path.join(d, 'SConscript')) 21 22Return('group') 23