提交 88421858 编写于 作者: mysterywolf's avatar mysterywolf

[sconscript.platform] 优化针对编译器判断的脚本

- 删除啰嗦的代码
related: https://github.com/RT-Thread/rt-thread/issues/3046
上级 3448a8b6
...@@ -10,13 +10,12 @@ src += Glob('*.c') ...@@ -10,13 +10,12 @@ src += Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
LOCAL_CCFLAGS = '' LOCAL_CCFLAGS = ''
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM == 'gcc':
LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc':
LOCAL_CCFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CCFLAGS += ' -std=c99' LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
if rtconfig.PLATFORM == 'armcc':
LOCAL_CCFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CCFLAGS += ' -std=c99'
group = DefineGroup('FAL', src, depend = ['PKG_USING_FAL'], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS) group = DefineGroup('FAL', src, depend = ['PKG_USING_FAL'], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
......
...@@ -25,13 +25,12 @@ if GetDepend('RT_USING_SFUD'): ...@@ -25,13 +25,12 @@ if GetDepend('RT_USING_SFUD'):
CPPPATH += [cwd + '/sfud/inc'] CPPPATH += [cwd + '/sfud/inc']
if GetDepend('RT_SFUD_USING_SFDP'): if GetDepend('RT_SFUD_USING_SFDP'):
src_device += ['sfud/src/sfud_sfdp.c'] src_device += ['sfud/src/sfud_sfdp.c']
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM == 'gcc':
LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc':
LOCAL_CCFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CCFLAGS += ' -std=c99' LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
if rtconfig.PLATFORM == 'armcc':
LOCAL_CCFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CCFLAGS += ' -std=c99'
src += src_device src += src_device
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册