report llvm-target/cpu empty warning in all targets check

This commit is contained in:
Li Jie
2025-08-22 07:41:59 +08:00
parent 44cb4f2649
commit d3d39876d3

View File

@@ -2,6 +2,7 @@
# Initialize arrays to store results
successful_targets=()
warned_targets=()
failed_targets=()
for target in \
@@ -211,15 +212,22 @@ xiao-esp32c3 \
xiao-rp2040 \
xiao \
xtensa; do
output=$(../../llgo.sh build -v -target $target -o hello.out . 2>&1)
output=$(../../llgo.sh build -target $target -o hello.out . 2>&1)
if [ $? -eq 0 ]; then
echo$target `file hello.out`
successful_targets+=("$target")
else
# Check if output contains warning messages
if echo "$output" | grep -q "does not have a valid LLVM target triple\|does not have a valid CPU configuration"; then
echo ⚠️ $target
echo "$output"
warned_targets+=("$target")
else
echo$target
echo "$output"
failed_targets+=("$target")
fi
fi
done
echo ""
@@ -231,6 +239,12 @@ for target in "${successful_targets[@]}"; do
echo "$target"
done
echo ""
echo "Warned targets (${#warned_targets[@]} total):"
for target in "${warned_targets[@]}"; do
echo "$target"
done
echo ""
echo "Failed targets (${#failed_targets[@]} total):"
for target in "${failed_targets[@]}"; do