aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-06-03 01:54:00 -0500
committerbors-servo <metajack+bors@gmail.com>2015-06-03 01:54:00 -0500
commit2e93ae7f76f9ceb6733352cfd0e16ab478f1d0a3 (patch)
tree8cdd7e3311bbcc56560b5985ad429e3532e670f8
parentb0f3417cffb211d547853b8069e7a444a1d9964f (diff)
parent68d977c5f0d7fd8347cd4e3a3229a84a9c66c631 (diff)
downloadservo-2e93ae7f76f9ceb6733352cfd0e16ab478f1d0a3.tar.gz
servo-2e93ae7f76f9ceb6733352cfd0e16ab478f1d0a3.zip
Auto merge of #6267 - brson:system-rust, r=SimonSapin
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 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6267) <!-- Reviewable:end -->
-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" % (