make sure that $TARGET splits for -dynamic, otherwise it resolves to "-target 'native-native -dynamic'"

This commit is contained in:
DubbleClick 2025-07-01 12:56:51 +07:00
parent ad8322b6a6
commit 7b33ee79dd

View File

@ -68,7 +68,7 @@ else
TARGET="${SPC_TARGET}-${SPC_LIBC}"
[ -n "$SPC_LIBC_VERSION" ] && TARGET="${TARGET}.${SPC_LIBC_VERSION}"
output=$(zig cc -target "$TARGET" -lstdc++ ${COMPILER_EXTRA} "${PARSED_ARGS[@]}" 2>&1)
output=$(zig cc -target ${TARGET} -lstdc++ ${COMPILER_EXTRA} "${PARSED_ARGS[@]}" 2>&1)
status=$?
if [ $status -eq 0 ]; then
@ -80,6 +80,6 @@ else
echo "$output" | grep -v "version '.*' in target triple"
exit 0
else
exec zig cc -target "$TARGET" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
exec zig cc -target ${TARGET} ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
fi
fi