[tools] add GetGCCLikePLATFORM

GCC like means the toolchains which are compatible with GCC
This commit is contained in:
Meco Man
2023-08-20 13:26:39 -04:00
parent 290678b665
commit 30c793fdb9
7 changed files with 16 additions and 7 deletions

View File

@@ -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)