mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
try to test with zig?
This commit is contained in:
@@ -34,7 +34,12 @@ while [[ $# -gt 0 ]]; do
|
||||
esac
|
||||
done
|
||||
|
||||
output=$(zig cc -target ${SPC_TARGET} -lstdc++ ${COMPILER_EXTRA} "${PARSED_ARGS[@]}" 2>&1)
|
||||
TARGET=""
|
||||
if [ -n "$SPC_TARGET" ]; then
|
||||
TARGET="-target $SPC_TARGET"
|
||||
else
|
||||
|
||||
output=$(zig cc $TARGET -lstdc++ $COMPILER_EXTRA "${PARSED_ARGS[@]}" 2>&1)
|
||||
status=$?
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
@@ -43,8 +48,8 @@ if [ $status -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if echo "$output" | grep -q "version '.*' in target triple"; then
|
||||
echo "$output" | grep -v "version '.*' in target triple"
|
||||
echo "$output" | grep -v "version '.*' in target triple"
|
||||
exit 0
|
||||
else
|
||||
exec zig cc -target ${SPC_TARGET} ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
|
||||
exec zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}"
|
||||
fi
|
||||
|
||||
@@ -20,7 +20,7 @@ class ToolchainManager
|
||||
public static function getToolchainClass(): string
|
||||
{
|
||||
$libc = getenv('SPC_LIBC');
|
||||
if ($libc !== false && !getenv('SPC_TARGET')) {
|
||||
if ($libc && !getenv('SPC_TARGET')) {
|
||||
// TODO: @crazywhalecc this breaks tests
|
||||
// logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
|
||||
return match ($libc) {
|
||||
|
||||
Reference in New Issue
Block a user