[Scons] 将GCC判断条件改为列表方式,方便后续增加新的编译工具链

This commit is contained in:
Meco Man
2022-06-09 07:01:59 +08:00
committed by guo
parent e622ef3aec
commit 50f041f5c2
236 changed files with 244 additions and 244 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ group = []
LIBS = []
CPPPATH = [cwd]
if rtconfig.PLATFORM == 'gcc':
if rtconfig.PLATFORM in ['gcc']:
LIBS += ['c', 'm'] # link libc and libm
src += Glob('*.c')
+1 -1
View File
@@ -14,7 +14,7 @@ CPPPATH = [cwd]
if rtconfig.PLATFORM == 'armclang' and GetDepend('RT_USING_CPLUSPLUS11'):
src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c')
CPPPATH += [cwd + '/cpp11/armclang']
elif rtconfig.PLATFORM == 'gcc' and GetDepend('RT_USING_CPLUSPLUS11'):
elif rtconfig.PLATFORM in ['gcc'] and GetDepend('RT_USING_CPLUSPLUS11'):
src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c')
CPPPATH += [cwd + '/cpp11/gcc']
+1 -1
View File
@@ -6,7 +6,7 @@ cwd = GetCurrentDir()
group = []
CPPPATH = [cwd]
if rtconfig.PLATFORM == 'gcc':
if rtconfig.PLATFORM in ['gcc']:
group = DefineGroup('POSIX', src, depend = ['RT_USING_MODULE'], CPPPATH = CPPPATH)
Return('group')