summaryrefslogtreecommitdiff
path: root/components/libc/compilers/common/SConscript
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-09-11 13:20:50 +0800
committerGitHub <[email protected]>2020-09-11 13:20:50 +0800
commitac751db6703f8117c8f3db5b612536cddf59bdcc (patch)
tree5d14525930868492bd142e9026a5e3c50fc42738 /components/libc/compilers/common/SConscript
parent36cb4349a61d768c5e2fad0798647dfb3e0b523e (diff)
parentb3ab8a99e10f68042a3f2cba11e130004aa124e4 (diff)
Merge pull request #3888 from mysterywolf/master
[add] [libc] libc新增getline/getdelim函数(posix.1-2008)
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')