Commit 60c7958b8e6 for nodejs
commit 60c7958b8e6c8cdd70537adbcee7c523c174e0b0
Author: Richard Lau <richard.lau@ibm.com>
Date: Tue Oct 6 15:19:05 2026 +0000
build: update flags for V8 CI
Continue to use torque for now instead of metagen.
Sync unsupported clang flags with upstream builds.
Refs: https://github.com/ibmruntimes/v8-build/blob/main/bin/v8.sh
Signed-off-by: Richard Lau <richard.lau@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/66537
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
diff --git a/tools/make-v8.sh b/tools/make-v8.sh
index 3b5b974651a..c222de0660e 100755
--- a/tools/make-v8.sh
+++ b/tools/make-v8.sh
@@ -41,12 +41,18 @@ if [ "$ARCH" = "s390x" ] || [ "$ARCH" = "ppc64le" ]; then
find build/ \( -name "*.gn" -o -name "*.gni" \) -exec sed -i \
-e '/-Wno-nontrivial-memcall/d' {} \;
fi
+ # Filter out options supported in clang < 21.
+ if [ "${CLANG_VERSION}" -lt "21" ]; then
+ find build/ \( -name "*.gn" -o -name "*.gni" \) -exec sed -i \
+ -e '/-Wno-uninitialized-const-pointer/d' \
+ -e '/-Wunnecessary-virtual-specifier/d' {} \;
+ fi
# Filter out compiler options not supported by non-nightly clang builds
if [ "${CLANG_VERSION}" -ge "19" ]; then
find build/ \( -name "*.gn" -o -name "*.gni" \) -exec sed -i \
-e '/-Wno-unsafe-buffer-usage-in-static-sized-array/d' \
- -e '/-Wno-uninitialized-const-pointer/d' \
-e '/-Wno-unused-but-set-global/d' \
+ -e '/-Wno-stringop-overread/d' \
-e '/-fno-lifetime-dse/d' \
-e '/-fsanitize-ignore-for-ubsan-feature/d' \
-e '/-fdiagnostics-show-inlining-chain/d' {} \;
@@ -64,7 +70,7 @@ if [ "$ARCH" = "s390x" ] || [ "$ARCH" = "ppc64le" ]; then
;;
*) GN_COMPILER_OPTS="treat_warnings_as_errors=false use_custom_libcxx=false" ;;
esac
- gn gen -v "out.gn/$BUILD_ARCH_TYPE" --args="$GN_COMPILER_OPTS is_component_build=false is_debug=false v8_target_cpu=\"$TARGET_ARCH\" target_cpu=\"$TARGET_ARCH\" v8_enable_backtrace=true ${GN_RUST_ARGS} $CC_WRAPPER"
+ gn gen -v "out.gn/$BUILD_ARCH_TYPE" --args="$GN_COMPILER_OPTS is_component_build=false is_debug=false v8_target_cpu=\"$TARGET_ARCH\" target_cpu=\"$TARGET_ARCH\" v8_enable_backtrace=true v8_use_metagen_instance_types=false ${GN_RUST_ARGS} $CC_WRAPPER"
ninja -v -C "out.gn/$BUILD_ARCH_TYPE" "${JOBS_ARG}" d8 cctest inspector-test
else
DEPOT_TOOLS_DIR="$(cd depot_tools && pwd)"