Skip to content

Commit c952b56

Browse files
committed
Allow missing intrinsic files for x86-64
1 parent 0b769ca commit c952b56

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cpython-unix/build-zstd.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@ tar -xf zstd-${ZSTD_VERSION}.tar.gz
1515
pushd cpython-source-deps-zstd-${ZSTD_VERSION}/lib
1616

1717
if [ "${CC}" = "musl-clang" ]; then
18-
# In order to build the library with SSE2, BMI, AVX2, and ARM NEON intrinstics, we need musl-clang to find
18+
# In order to build the library with intrinsics, we need musl-clang to find
1919
# headers that provide access to the intrinsics, as they are not provided by musl. These are
2020
# part of the include files that are part of clang. But musl-clang eliminates them from the
2121
# default include path. So copy them into place.
2222
for h in ${TOOLS_PATH}/${TOOLCHAIN}/lib/clang/*/include/*intrin.h ${TOOLS_PATH}/${TOOLCHAIN}/lib/clang/*/include/{__wmmintrin_aes.h,__wmmintrin_pclmul.h,emmintrin.h,immintrin.h,mm_malloc.h,arm_neon.h,arm_neon_sve_bridge.h,arm_bf16.h,arm_fp16.h,arm_acle.h,arm_vector_types.h}; do
2323
filename=$(basename "$h")
24-
if [ -e "${TOOLS_PATH}/host/include/${filename}" ]; then
25-
echo "warning: ${filename} already exists"
24+
if [ -f "$h" ]; then
25+
if [ -e "${TOOLS_PATH}/host/include/${filename}" ]; then
26+
echo "warning: ${filename} already exists"
27+
fi
28+
cp "$h" ${TOOLS_PATH}/host/include/
29+
else
30+
echo "warning: ${filename} not found (skipping)"
2631
fi
27-
cp "$h" ${TOOLS_PATH}/host/include/
2832
done
2933
EXTRA_TARGET_CFLAGS="${EXTRA_TARGET_CFLAGS} -I${TOOLS_PATH}/host/include/"
3034

0 commit comments

Comments
 (0)