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 @@ -407,6 +407,22 @@ if [ "${CC}" = "musl-clang" ]; then
407
407
done
408
408
fi
409
409
410
+ # To enable mimalloc (which is hard requirement for free-threaded versions, but preferred in
411
+ # general), we need `stdatomic.h` which is not provided by musl. These are part of the include files
412
+ # that are part of clang. But musl-clang eliminates them from the default include path. So copy them
413
+ # into place.
414
+ if [[ " ${CC} " = " musl-clang" && -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_13} " ]]; then
415
+ for h in /tools/${TOOLCHAIN} /lib/clang/* /include/stdatomic.h; do
416
+ filename=$( basename " $h " )
417
+ if [ -e " /tools/host/include/${filename} " ]; then
418
+ echo " ${filename} already exists; don't need to copy!"
419
+ exit 1
420
+ fi
421
+ cp " $h " /tools/host/include/
422
+ done
423
+ fi
424
+
425
+
410
426
if [ -n " ${CPYTHON_STATIC} " ]; then
411
427
CFLAGS=" ${CFLAGS} -static"
412
428
CPPFLAGS=" ${CPPFLAGS} -static"
You can’t perform that action at this time.
0 commit comments