summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorguozhanxin <[email protected]>2021-12-22 00:39:08 +0800
committerBernard Xiong <[email protected]>2021-12-22 13:03:05 +0800
commita5f6fdc780d55f2bf2a1624815879e15c51082b5 (patch)
tree2b6c18c4f220e7ce124be0ead2cd3080d3668bf9 /components
parentf20eef99db5ef5a499e4af71275a73a7eedcca41 (diff)
add clang-arm support.
Diffstat (limited to 'components')
-rw-r--r--components/drivers/spi/SConscript2
-rw-r--r--components/libc/compilers/common/nogcc/SConscript2
-rw-r--r--components/libc/compilers/gcc/newlib/SConscript2
3 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript
index d6cb93f7f1..da14ed5fef 100644
--- a/components/drivers/spi/SConscript
+++ b/components/drivers/spi/SConscript
@@ -25,7 +25,7 @@ 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.CROSS_TOOL == 'gcc' or rtconfig.CROSS_TOOL == 'clang':
LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
if rtconfig.PLATFORM == 'armcc':
diff --git a/components/libc/compilers/common/nogcc/SConscript b/components/libc/compilers/common/nogcc/SConscript
index c766c8f82d..b144f1b3b4 100644
--- a/components/libc/compilers/common/nogcc/SConscript
+++ b/components/libc/compilers/common/nogcc/SConscript
@@ -10,6 +10,6 @@ group = []
if GetDepend('RT_USING_LIBC'):
src += Glob('*.c')
-if rtconfig.PLATFORM != 'gcc' or rtconfig.ARCH == 'sim':
+if (rtconfig.PLATFORM != 'gcc' and rtconfig.PLATFORM != 'clang') or rtconfig.ARCH == 'sim':
group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH)
Return('group')
diff --git a/components/libc/compilers/gcc/newlib/SConscript b/components/libc/compilers/gcc/newlib/SConscript
index 58672a0255..7ab0dd046b 100644
--- a/components/libc/compilers/gcc/newlib/SConscript
+++ b/components/libc/compilers/gcc/newlib/SConscript
@@ -7,7 +7,7 @@ group = []
LIBS = ['m'] # link libm
CPPPATH = [cwd]
-if rtconfig.PLATFORM == 'gcc':
+if rtconfig.PLATFORM == 'gcc' or rtconfig.PLATFORM == 'clang':
if GetDepend('RT_USING_LIBC'):
LIBS += ['c'] # link libc
src += Glob('*.c')