diff options
| author | Bernard Xiong <[email protected]> | 2022-01-20 21:01:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-20 21:01:00 +0800 |
| commit | b5de9861220b58f57d2018464e6b4b074377cd4f (patch) | |
| tree | 75d6affd3a60b35092b979b72c3de86ef6dcd045 /components | |
| parent | 8bf5a285281d5699630fa1d2c9f12db1d0d2263c (diff) | |
| parent | 7c403d3587cdb9e99456f0517650108852bcc915 (diff) | |
Merge pull request #5542 from mysterywolf/keil
[sconscript.platform] 优化针对编译器判断
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/spi/SConscript | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript index fab1298f8a..81d2c4c8a0 100644 --- a/components/drivers/spi/SConscript +++ b/components/drivers/spi/SConscript @@ -25,13 +25,13 @@ 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_CFLAGS += ' -std=c99' + elif rtconfig.PLATFORM == 'armcc': + LOCAL_CFLAGS += ' --c99' + elif rtconfig.PLATFORM == 'armclang': LOCAL_CFLAGS += ' -std=c99' - elif rtconfig.CROSS_TOOL == 'keil': - if rtconfig.PLATFORM == 'armcc': - LOCAL_CFLAGS += ' --c99' - elif rtconfig.PLATFORM == 'armclang': - LOCAL_CFLAGS += ' -std=c99' src += src_device |
