about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/bootstrap.py')
-rw-r--r--src/bootstrap/bootstrap.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 08a8ca5a631..a3fabbb3e80 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -226,13 +226,16 @@ class RustBuild(object):
         config = self.get_toml('cargo')
         if config:
             return config
+        config = self.get_mk('CFG_LOCAL_RUST_ROOT')
+        if config:
+            return config + '/bin/cargo' + self.exe_suffix()
         return os.path.join(self.bin_root(), "bin/cargo" + self.exe_suffix())
 
     def rustc(self):
         config = self.get_toml('rustc')
         if config:
             return config
-        config = self.get_mk('CFG_LOCAL_RUST')
+        config = self.get_mk('CFG_LOCAL_RUST_ROOT')
         if config:
             return config + '/bin/rustc' + self.exe_suffix()
         return os.path.join(self.bin_root(), "bin/rustc" + self.exe_suffix())