From ba7b9b91825183d169b590eed107d49508a3a60a Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Mon, 29 Jun 2026 02:52:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20build.sh=20=E4=B8=8D=E5=86=8D=E5=90=9E?= =?UTF-8?q?=20QuickJS=20=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 make 后面的 || true,编译失败会正确报错退出 - 移除 grep 过滤,完整打印编译输出方便排查链接问题 - 编译失败时返回 1 终止构建 (cherry picked from commit 0c77246586a21190f392ab964cc29bdf58ca9128) --- benchmark/build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/benchmark/build.sh b/benchmark/build.sh index db9b6d09..211ea0ec 100644 --- a/benchmark/build.sh +++ b/benchmark/build.sh @@ -76,8 +76,15 @@ build_quickjs() { return 0 fi info "编译 QuickJS..." - make -j"$(nproc 2>/dev/null || echo 4)" all 2>&1 | grep -E "error|CC |LD " || true - cp qjs run-test262 build/ 2>/dev/null || true + if make -j"$(nproc 2>/dev/null || echo 4)" all 2>&1; then + info "QuickJS 编译成功" + else + err "QuickJS 编译失败 (rc=$?)" + cd "$SCRIPT_DIR" + return 1 + fi + # QuickJS Makefile 将二进制输出到源根目录,拷贝到 build/ 备用 + cp -f qjs run-test262 build/ 2>/dev/null || true cd "$SCRIPT_DIR" info "QuickJS 完成" }