mirror of
https://github.com/servo/servo.git
synced 2025-06-09 09:03:23 +00:00
Auto merge of #23628 - emilio:path-shuffling-cleanup, r=Manishearth
build: Cleanup some path-munging code. I was looking at this today, and this seems better than the pre-existing code, generally pre-pending to these paths isn't great... <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23628) <!-- Reviewable:end -->
This commit is contained in:
commit
2e9637477c
1 changed files with 4 additions and 12 deletions
|
@ -211,7 +211,7 @@ def append_to_path_env(string, env, name):
|
||||||
if name in env:
|
if name in env:
|
||||||
variable = env[name]
|
variable = env[name]
|
||||||
if len(variable) > 0:
|
if len(variable) > 0:
|
||||||
variable += ":"
|
variable += os.pathsep
|
||||||
variable += string
|
variable += string
|
||||||
env[name] = variable
|
env[name] = variable
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ install them, let us know by filing a bug!")
|
||||||
env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true"
|
env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true"
|
||||||
|
|
||||||
if extra_path:
|
if extra_path:
|
||||||
env["PATH"] = "%s%s%s" % (os.pathsep.join(extra_path), os.pathsep, env["PATH"])
|
append_to_path_env(os.pathsep.join(extra_path), env, "PATH")
|
||||||
|
|
||||||
if self.config["build"]["incremental"]:
|
if self.config["build"]["incremental"]:
|
||||||
env["CARGO_INCREMENTAL"] = "1"
|
env["CARGO_INCREMENTAL"] = "1"
|
||||||
|
@ -649,16 +649,8 @@ install them, let us know by filing a bug!")
|
||||||
env["CARGO_INCREMENTAL"] = "0"
|
env["CARGO_INCREMENTAL"] = "0"
|
||||||
|
|
||||||
if extra_lib:
|
if extra_lib:
|
||||||
if sys.platform == "darwin":
|
path_var = "DYLD_LIBRARY_PATH" if sys.platform == "darwin" else "LD_LIBRARY_PATH"
|
||||||
env["DYLD_LIBRARY_PATH"] = "%s%s%s" % \
|
append_to_path_env(os.pathsep.join(extra_lib), env, path_var)
|
||||||
(os.pathsep.join(extra_lib),
|
|
||||||
os.pathsep,
|
|
||||||
env.get("DYLD_LIBRARY_PATH", ""))
|
|
||||||
else:
|
|
||||||
env["LD_LIBRARY_PATH"] = "%s%s%s" % \
|
|
||||||
(os.pathsep.join(extra_lib),
|
|
||||||
os.pathsep,
|
|
||||||
env.get("LD_LIBRARY_PATH", ""))
|
|
||||||
|
|
||||||
# Paths to Android build tools:
|
# Paths to Android build tools:
|
||||||
if self.config["android"]["sdk"]:
|
if self.config["android"]["sdk"]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue