summaryrefslogtreecommitdiff
path: root/components/libc/compilers/common/SConscript
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-03-02 15:00:43 +0800
committerGitHub <[email protected]>2021-03-02 15:00:43 +0800
commit2c12493ff342ea9ba808311c3f6835eba31a8d3e (patch)
treeb1e1dfbeaead7c08ab8d7d0f34066154c125841b /components/libc/compilers/common/SConscript
parent5f17cf9204e501d971cd28486e0a7193d2f1fae4 (diff)
parent19871ac32e41590b1f3e3742d9ab023dc3147ba0 (diff)
Merge pull request #4404 from KyleChenjh/lts-v3.1.x
[Update] Sync from v4.0.3
Diffstat (limited to 'components/libc/compilers/common/SConscript')
-rw-r--r--components/libc/compilers/common/SConscript11
1 files changed, 7 insertions, 4 deletions
diff --git a/components/libc/compilers/common/SConscript b/components/libc/compilers/common/SConscript
index a8d2606820..2407301405 100644
--- a/components/libc/compilers/common/SConscript
+++ b/components/libc/compilers/common/SConscript
@@ -8,12 +8,15 @@ group = []
CPPPATH = [cwd]
if GetDepend('RT_USING_LIBC'):
- src += Glob('*.c')
+ src += Glob('*.c')
else:
- if GetDepend('RT_LIBC_USING_TIME'):
+ if GetDepend('RT_LIBC_USING_TIME') and not GetDepend('RT_USING_MINILIBC'):
src += ['time.c']
-if (rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'iar') and rtconfig.ARCH != 'sim' :
- group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH)
+if GetDepend('RT_USING_POSIX') == False:
+ SrcRemove(src, ['unistd.c'])
+
+if not GetDepend('RT_USING_MINILIBC') and (GetDepend('RT_USING_LIBC') or GetDepend('RT_LIBC_USING_TIME')):
+ group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH)
Return('group')