Commit 424461cc authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Make node script's gclient dependency platform-independent.

This is a small step towards making node build on Windows.

Bug: v8:6105

R=machenbach@chromium.org

Change-Id: I8d3a9b1830bb012d846a791fddc8d1d8d830515e
Reviewed-on: https://chromium-review.googlesource.com/980950
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52400}
parent 595f1428
......@@ -73,10 +73,11 @@ def FetchDeps(v8_path):
env = os.environ.copy()
# gclient needs to have depot_tools in the PATH.
env["PATH"] = depot_tools + os.pathsep + env["PATH"]
gclient = os.path.join(depot_tools, "gclient.py")
spec = "solutions = %s" % GCLIENT_SOLUTION
subprocess.check_call(["gclient", "sync", "--spec", spec],
cwd=os.path.join(v8_path, os.path.pardir),
env=env)
subprocess.check_call([sys.executable, gclient, "sync", "--spec", spec],
cwd=os.path.join(v8_path, os.path.pardir),
env=env)
except:
raise
finally:
......
......@@ -15,9 +15,8 @@ def EnsureDepotTools(v8_path, fetch_if_not_exist):
def _Get(v8_path):
depot_tools = os.path.join(v8_path, "_depot_tools")
try:
gclient_path = os.path.join(depot_tools, "gclient")
gclient_check = subprocess.check_output([gclient_path, "--version"])
if "gclient.py" in gclient_check:
gclient_path = os.path.join(depot_tools, "gclient.py")
if os.path.isfile(gclient_path):
return depot_tools
except:
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment