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