1
0

SConscript 704 B

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