aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-05-16 16:19:00 -0700
committerBrian Anderson <banderson@mozilla.com>2015-06-02 16:11:02 -0700
commit68d977c5f0d7fd8347cd4e3a3229a84a9c66c631 (patch)
treec499f755143745b782516ec62dfe62100228e274 /python
parent2fb8d31b0619a749256dfcd7c241f4b96e1a6d46 (diff)
downloadservo-68d977c5f0d7fd8347cd4e3a3229a84a9c66c631.tar.gz
servo-68d977c5f0d7fd8347cd4e3a3229a84a9c66c631.zip
Support a system root with correct on-disk directory layout
The existing code for setting up the environment assumes that the directory layout containing rust and cargo conforms to the one used by rust-installer's tarballs. This makes overriding the system root awkward for simple cases where I want to test my own build directly from the rust build directory. This patch just adds a second path to PATH and LD_LIBRARY_PATH to accomodate both disk layouts. Conflicts: python/servo/command_base.py
Diffstat (limited to 'python')
-rw-r--r--python/servo/command_base.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 80811e30a04..ed8f9de2de8 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -167,12 +167,21 @@ class CommandBase(object):
if not self.config["tools"]["system-rust"] \
or self.config["tools"]["rust-root"]:
env["RUST_ROOT"] = self.config["tools"]["rust-root"]
+ # These paths are for when rust-root points to an unpacked installer
extra_path += [path.join(self.config["tools"]["rust-root"], "rustc", "bin")]
extra_lib += [path.join(self.config["tools"]["rust-root"], "rustc", "lib")]
+ # These paths are for when rust-root points to a rustc sysroot
+ extra_path += [path.join(self.config["tools"]["rust-root"], "bin")]
+ extra_lib += [path.join(self.config["tools"]["rust-root"], "lib")]
+
if not self.config["tools"]["system-cargo"] \
or self.config["tools"]["cargo-root"]:
+ # This path is for when rust-root points to an unpacked installer
extra_path += [
path.join(self.config["tools"]["cargo-root"], "cargo", "bin")]
+ # This path is for when rust-root points to a rustc sysroot
+ extra_path += [
+ path.join(self.config["tools"]["cargo-root"], "bin")]
if extra_path:
env["PATH"] = "%s%s%s" % (