diff options
| author | Bernard Xiong <[email protected]> | 2021-11-10 22:23:43 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-10 22:23:43 +0800 |
| commit | e6ae01e3326a5feb6d11176c3407bee7c920399c (patch) | |
| tree | 80dc67ad821469bed720e01880a2901e5732d6a2 /components/libc/posix/src/SConscript | |
| parent | fdbaa2a808d12d522ad90702795c08ae8443aab9 (diff) | |
| parent | 219d1e20f579cda0aac62d90bf926e8a0a9dd688 (diff) | |
Merge pull request #5259 from mysterywolf/posix
[posix] 优化posix若干
Diffstat (limited to 'components/libc/posix/src/SConscript')
| -rw-r--r-- | components/libc/posix/src/SConscript | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/components/libc/posix/src/SConscript b/components/libc/posix/src/SConscript index f338b52cec..0f5d0e9911 100644 --- a/components/libc/posix/src/SConscript +++ b/components/libc/posix/src/SConscript @@ -1,12 +1,22 @@ +# RT-Thread building script for component + from building import * -Import('rtconfig') -src = Glob('*.c') +src = ['unistd.c', 'delay.c'] cwd = GetCurrentDir() CPPPATH = [cwd] -if rtconfig.ARCH == 'sim': # the vs simulator does not support select and poll - SrcRemove(src, ['select.c', 'poll.c']) +if GetDepend('RT_USING_POSIX_STDIO'): + src += ['libc.c'] + +if GetDepend('RT_USING_POSIX_POLL'): + src += ['poll.c'] + +if GetDepend('RT_USING_POSIX_SELECT'): + src += ['select.c'] + +if GetDepend('RT_USING_POSIX_MMAP'): + src += ['mmap.c'] group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH) |
