mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Pass feature list to build_env()
This commit is contained in:
parent
4e3f164f7b
commit
a3ef594470
2 changed files with 6 additions and 4 deletions
|
@ -260,7 +260,7 @@ class MachCommands(CommandBase):
|
||||||
check_call(["rustup" + BIN_SUFFIX, "target", "add",
|
check_call(["rustup" + BIN_SUFFIX, "target", "add",
|
||||||
"--toolchain", self.toolchain(), target])
|
"--toolchain", self.toolchain(), target])
|
||||||
|
|
||||||
env = self.build_env(target=target, is_build=True, uwp=uwp)
|
env = self.build_env(target=target, is_build=True, uwp=uwp, features=features)
|
||||||
self.ensure_bootstrapped(target=target)
|
self.ensure_bootstrapped(target=target)
|
||||||
self.ensure_clobbered()
|
self.ensure_clobbered()
|
||||||
|
|
||||||
|
|
|
@ -562,9 +562,11 @@ class CommandBase(object):
|
||||||
|
|
||||||
return self.get_executable(destination_folder)
|
return self.get_executable(destination_folder)
|
||||||
|
|
||||||
def needs_gstreamer_env(self, target, env, uwp=False):
|
def needs_gstreamer_env(self, target, env, uwp=False, features=None):
|
||||||
if uwp:
|
if uwp:
|
||||||
return False
|
return False
|
||||||
|
if "media-dummy" in features:
|
||||||
|
return False
|
||||||
try:
|
try:
|
||||||
if check_gstreamer_lib():
|
if check_gstreamer_lib():
|
||||||
return False
|
return False
|
||||||
|
@ -620,7 +622,7 @@ install them, let us know by filing a bug!")
|
||||||
'vcdir': vcinstalldir,
|
'vcdir': vcinstalldir,
|
||||||
}
|
}
|
||||||
|
|
||||||
def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False, uwp=False):
|
def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False, uwp=False, features=None):
|
||||||
"""Return an extended environment dictionary."""
|
"""Return an extended environment dictionary."""
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
if sys.platform == "win32" and type(env['PATH']) == unicode:
|
if sys.platform == "win32" and type(env['PATH']) == unicode:
|
||||||
|
@ -670,7 +672,7 @@ install them, let us know by filing a bug!")
|
||||||
# Always build harfbuzz from source
|
# Always build harfbuzz from source
|
||||||
env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true"
|
env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true"
|
||||||
|
|
||||||
if is_build and self.needs_gstreamer_env(target or host_triple(), env, uwp):
|
if is_build and self.needs_gstreamer_env(target or host_triple(), env, uwp, features):
|
||||||
gstpath = gstreamer_root(target or host_triple(), env, self.get_top_dir())
|
gstpath = gstreamer_root(target or host_triple(), env, self.get_top_dir())
|
||||||
extra_path += [path.join(gstpath, "bin")]
|
extra_path += [path.join(gstpath, "bin")]
|
||||||
libpath = path.join(gstpath, "lib")
|
libpath = path.join(gstpath, "lib")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue