aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-11-27 11:56:47 -0500
committerGitHub <noreply@github.com>2019-11-27 11:56:47 -0500
commitfcdf347d8381435ff6af7c933a886f7565f05b80 (patch)
tree50b643dc56b237873caacc0a766923e395d96f4a /python
parent9b5c79fccccc4e907bb13d6aac463a0f1c1741ef (diff)
downloadservo-fcdf347d8381435ff6af7c933a886f7565f05b80.tar.gz
servo-fcdf347d8381435ff6af7c933a886f7565f05b80.zip
Support overriding the moztools path order.
Diffstat (limited to 'python')
-rw-r--r--python/servo/command_base.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 20c02852d8a..7473b78844d 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -659,10 +659,16 @@ install them, let us know by filing a bug!")
env["OPENSSL_LIB_DIR"] = path.join(openssl_base_dir, "lib")
env["OPENSSL_LIBS"] = "libssl:libcrypto"
# Link moztools, used for building SpiderMonkey
- env["MOZTOOLS_PATH"] = os.pathsep.join([
+ moztools_paths = [
path.join(self.msvc_package_dir("moztools"), "bin"),
path.join(self.msvc_package_dir("moztools"), "msys", "bin"),
- ])
+ ]
+ # In certain cases we need to ensure that tools with conflicting MSYS versions
+ # can be placed in the PATH ahead of the moztools directories.
+ moztools_path_prepend = env.get("MOZTOOLS_PATH_PREPEND", None)
+ if moztools_path_prepend:
+ moztools_paths.insert(0, moztools_path_prepend)
+ env["MOZTOOLS_PATH"] = os.pathsep.join(moztools_paths)
# Link autoconf 2.13, used for building SpiderMonkey
env["AUTOCONF"] = path.join(self.msvc_package_dir("moztools"), "msys", "local", "bin", "autoconf-2.13")
# Link LLVM