From abd73d865ae25df50d9c91b65d6843b48a2e8d9f Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 7 Mar 2025 15:35:36 +0000 Subject: [PATCH] build: fix compatibility with V8's `depot_tools` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recent changes to `depot_tools`'s `ninja.py` proxy is causing infinite recursion in our V8 CI builds as we checkout `depot_tools` into a directory with a leading `_` (i.e. `_depot_tools`) and the proxy now checks for an exact match (i.e. `== "depot_tools"`) instead of `endswith("depot_tools")`. Rename our checkout to `depot_tools` (without the leading `_`) so the `ninja.py` proxy can exclude it when reinvoking `ninja`. PR-URL: https://github.com/nodejs/node/pull/57330 Fixes: https://github.com/nodejs/build/issues/4027 Refs: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6259139 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca Reviewed-By: Christian Clauss --- tools/make-v8.sh | 2 +- tools/v8/node_common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/make-v8.sh b/tools/make-v8.sh index f53f013e0e..8d8f090f0f 100755 --- a/tools/make-v8.sh +++ b/tools/make-v8.sh @@ -53,7 +53,7 @@ if [ "$ARCH" = "s390x" ] || [ "$ARCH" = "ppc64le" ]; then gn gen -v "out.gn/$BUILD_ARCH_TYPE" --args="is_component_build=false is_debug=false use_goma=false goma_dir=\"None\" use_custom_libcxx=false v8_target_cpu=\"$TARGET_ARCH\" target_cpu=\"$TARGET_ARCH\" v8_enable_backtrace=true $CC_WRAPPER" ninja -v -C "out.gn/$BUILD_ARCH_TYPE" "${JOBS_ARG}" d8 cctest inspector-test else - DEPOT_TOOLS_DIR="$(cd _depot_tools && pwd)" + DEPOT_TOOLS_DIR="$(cd depot_tools && pwd)" # shellcheck disable=SC2086 PATH="$DEPOT_TOOLS_DIR":$PATH tools/dev/v8gen.py "$BUILD_ARCH_TYPE" $V8_BUILD_OPTIONS PATH="$DEPOT_TOOLS_DIR":$PATH ninja -C "out.gn/$BUILD_ARCH_TYPE/" "${JOBS_ARG}" d8 cctest inspector-test diff --git a/tools/v8/node_common.py b/tools/v8/node_common.py index b78e30c321..f873065c1d 100755 --- a/tools/v8/node_common.py +++ b/tools/v8/node_common.py @@ -18,7 +18,7 @@ DEPOT_TOOLS_URL = \ def EnsureDepotTools(v8_path, fetch_if_not_exist): def _Get(v8_path): - depot_tools = os.path.join(v8_path, "_depot_tools") + depot_tools = os.path.join(v8_path, "depot_tools") try: gclient_path = os.path.join(depot_tools, "gclient.py") if os.path.isfile(gclient_path):