From d3d39876d354a086708a064ec3df40c8ae713df6 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Fri, 22 Aug 2025 07:41:59 +0800 Subject: [PATCH] report llvm-target/cpu empty warning in all targets check --- _demo/targetsbuild/build-all.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/_demo/targetsbuild/build-all.sh b/_demo/targetsbuild/build-all.sh index dc7be286..8fbf615d 100644 --- a/_demo/targetsbuild/build-all.sh +++ b/_demo/targetsbuild/build-all.sh @@ -2,6 +2,7 @@ # Initialize arrays to store results successful_targets=() +warned_targets=() failed_targets=() for target in \ @@ -211,14 +212,21 @@ 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 - echo ❌ $target - echo "$output" - failed_targets+=("$target") + # 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 @@ -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