File tree 1 file changed +16
-0
lines changed 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,22 @@ if [ "${CC}" = "musl-clang" ]; then
401
401
done
402
402
fi
403
403
404
+ # To enable mimalloc (which is hard requirement for free-threaded versions, but preferred in
405
+ # general), we need `stdatomic.h` which is not provided by musl. It's are part of the include files
406
+ # that are part of clang. But musl-clang eliminates them from the default include path. So copy it
407
+ # into place.
408
+ if [[ " ${CC} " = " musl-clang" && -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_13} " ]]; then
409
+ for h in /tools/${TOOLCHAIN} /lib/clang/* /include/stdatomic.h; do
410
+ filename=$( basename " $h " )
411
+ if [ -e " /tools/host/include/${filename} " ]; then
412
+ echo " ${filename} already exists; don't need to copy!"
413
+ exit 1
414
+ fi
415
+ cp " $h " /tools/host/include/
416
+ done
417
+ fi
418
+
419
+
404
420
if [ -n " ${CPYTHON_STATIC} " ]; then
405
421
CFLAGS=" ${CFLAGS} -static"
406
422
CPPFLAGS=" ${CPPFLAGS} -static"
You can’t perform that action at this time.
0 commit comments