fix(benchmark): build.sh 不再吞 QuickJS 编译错误

- 移除 make 后面的 || true,编译失败会正确报错退出
- 移除 grep 过滤,完整打印编译输出方便排查链接问题
- 编译失败时返回 1 终止构建

(cherry picked from commit 0c77246586a21190f392ab964cc29bdf58ca9128)
This commit is contained in:
爱特每羊队
2026-06-29 02:52:27 +08:00
parent a0059387c7
commit 6edeadc149
+9 -2
View File
@@ -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 完成"
}