Skip to content

Commit 2564da2

Browse files
committed
Reapply "just strip out the error and return the output instead of executing again without version"
This reverts commit 1d29ac2.
1 parent bd25de1 commit 2564da2

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/SPC/store/scripts/zig-cc.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,13 @@ else
7272
status=$?
7373

7474
if [ $status -eq 0 ]; then
75-
echo "$output" | grep -v "version '.*' in target triple"
75+
echo "$output"
7676
exit 0
7777
fi
7878

7979
if echo "$output" | grep -q "version '.*' in target triple"; then
80-
TARGET_FALLBACK="${SPC_TARGET}-${SPC_LIBC}"
81-
output=$(zig cc -target "$TARGET_FALLBACK" -lstdc++ ${COMPILER_EXTRA} "${PARSED_ARGS[@]}" 2>&1)
82-
status=$?
83-
84-
if [ $status -eq 0 ]; then
85-
echo "$output"
86-
exit 0
87-
else
88-
exec zig cc -target "$TARGET_FALLBACK" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
89-
fi
80+
echo "$output" | grep -v "version '.*' in target triple"
81+
exit 0
9082
else
9183
exec zig cc -target "$TARGET" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
9284
fi

0 commit comments

Comments
 (0)