Skip to content

Commit

Permalink
build: fix compatibility with V8's depot_tools
Browse files Browse the repository at this point in the history
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: #57330
Fixes: nodejs/build#4027
Refs: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6259139
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Christian Clauss <[email protected]>
  • Loading branch information
richardlau authored and marco-ippolito committed Mar 7, 2025
1 parent 46ceb9d commit d8eaf5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/make-v8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/v8/node_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

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):
Expand Down

0 comments on commit d8eaf5b

Please sign in to comment.