Skip to content

Commit 829bd3f

Browse files
committed
Only include C11 thread library functions when targeting pthreads
1 parent 923c2a8 commit 829bd3f

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

tools/system_libs.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -774,16 +774,7 @@ def get_files(self):
774774

775775
libc_files += files_in_path(
776776
path_components=['system', 'lib', 'libc', 'musl', 'src', 'thread'],
777-
filenames=[
778-
'pthread_self.c',
779-
# C11 thread library functions
780-
'thrd_create.c',
781-
'thrd_exit.c',
782-
'thrd_join.c',
783-
'thrd_sleep.c',
784-
'thrd_yield.c',
785-
'call_once.c',
786-
])
777+
filenames=['pthread_self.c'])
787778

788779
libc_files += glob_in_path(['system', 'lib', 'libc', 'compat'], '*.c')
789780

@@ -833,6 +824,13 @@ def get_files(self):
833824
'pthread_getattr_np.c',
834825
'default_attr.c',
835826
'lock_ptc.c',
827+
# C11 thread library functions
828+
'thrd_create.c',
829+
'thrd_exit.c',
830+
'thrd_join.c',
831+
'thrd_sleep.c',
832+
'thrd_yield.c',
833+
'call_once.c',
836834
])
837835
libc_files += files_in_path(
838836
path_components=['system', 'lib', 'pthread'],

0 commit comments

Comments
 (0)