summaryrefslogtreecommitdiff
path: root/components/libc/cplusplus
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-08-20 13:26:39 -0400
committerMeco Man <[email protected]>2023-08-21 01:25:52 -0400
commit30c793fdb99376197a569d28ec74d76cfc6d6638 (patch)
tree10014bb575af3bfd63a81d77de1ed6a147023735 /components/libc/cplusplus
parent290678b66576e9adaaa338f0e110ce17535bd262 (diff)
[tools] add GetGCCLikePLATFORM
GCC like means the toolchains which are compatible with GCC
Diffstat (limited to 'components/libc/cplusplus')
-rw-r--r--components/libc/cplusplus/SConscript4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/cplusplus/SConscript b/components/libc/cplusplus/SConscript
index 2f280892f4..8b3a2f6f86 100644
--- a/components/libc/cplusplus/SConscript
+++ b/components/libc/cplusplus/SConscript
@@ -1,4 +1,5 @@
from building import *
+from gcc import *
import os
Import('rtconfig')
@@ -7,8 +8,7 @@ src = ['cxx_crt_init.c', 'cxx_crt.cpp']
CPPPATH = [cwd]
CXXFLAGS = ''
-
-if rtconfig.PLATFORM in ['gcc', 'armclang', 'llvm-arm'] and not GetDepend('RT_USING_CPP_EXCEPTIONS'):
+if rtconfig.PLATFORM in GetGCCLikePLATFORM() and not GetDepend('RT_USING_CPP_EXCEPTIONS'):
CXXFLAGS += ' -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections' # reduce resource consumptions
group = DefineGroup('CPP', src, depend=['RT_USING_CPLUSPLUS'], CPPPATH=CPPPATH, CXXFLAGS=CXXFLAGS)