From 884218588ae6a68ed923e4a9774f2ea4d76b90db Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 19 Jan 2022 23:24:47 -0500 Subject: [sconscript.platform] 优化针对编译器判断的脚本 - 删除啰嗦的代码 related: https://github.com/RT-Thread/rt-thread/issues/3046 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/spi/SConscript | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'components') diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript index d6cb93f7f1..f1c2bd343d 100644 --- a/components/drivers/spi/SConscript +++ b/components/drivers/spi/SConscript @@ -25,13 +25,12 @@ if GetDepend('RT_USING_SFUD'): CPPPATH += [cwd + '/sfud/inc'] if GetDepend('RT_SFUD_USING_SFDP'): 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' - elif rtconfig.CROSS_TOOL == 'keil': - if rtconfig.PLATFORM == 'armcc': - LOCAL_CCFLAGS += ' --c99' - elif rtconfig.PLATFORM == 'armclang': - LOCAL_CCFLAGS += ' -std=c99' src += src_device -- cgit v1.3.1