summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build_third_party.py2
-rw-r--r--tools/util.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/build_third_party.py b/tools/build_third_party.py
index d1ae16ccf..e46c8ddd1 100755
--- a/tools/build_third_party.py
+++ b/tools/build_third_party.py
@@ -29,3 +29,5 @@ remove_and_symlink(join("v8", "third_party", "llvm-build"), "llvm-build")
remove_and_symlink(join("v8", "third_party", "markupsafe"), "markupsafe")
run(["gclient", "sync", "--shallow", "--no-history"])
run(["yarn"])
+run(["cargo", "fetch", "--manifest-path=../Cargo.toml"],
+ envs={'CARGO_HOME': third_party_path + '/rust_crates'})
diff --git a/tools/util.py b/tools/util.py
index 6874f8000..8b8628aba 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -4,10 +4,12 @@ import os
import subprocess
-def run(args, quiet=False):
+def run(args, quiet=False, envs={}):
if not quiet:
print " ".join(args)
env = os.environ.copy()
+ for key in envs.keys():
+ env[key] = envs[key]
if os.name == "nt":
# Run through shell to make .bat/.cmd files work.
args = ["cmd", "/c"] + args