Skip to content

Commit

Permalink
Pass feature list to build_env()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuncer Ayaz committed Nov 21, 2019
1 parent 4e3f164 commit a3ef594
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/servo/build_commands.py
Expand Up @@ -260,7 +260,7 @@ def build(self, release=False, dev=False, jobs=None, params=None, media_stack=No
check_call(["rustup" + BIN_SUFFIX, "target", "add",
"--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_clobbered()

Expand Down
8 changes: 5 additions & 3 deletions python/servo/command_base.py
Expand Up @@ -562,9 +562,11 @@ def get_nightly_binary_path(self, nightly_date):

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:
return False
if "media-dummy" in features:
return False
try:
if check_gstreamer_lib():
return False
Expand Down Expand Up @@ -620,7 +622,7 @@ def vs_dirs(self):
'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."""
env = os.environ.copy()
if sys.platform == "win32" and type(env['PATH']) == unicode:
Expand Down Expand Up @@ -670,7 +672,7 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit
# Always build harfbuzz from source
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())
extra_path += [path.join(gstpath, "bin")]
libpath = path.join(gstpath, "lib")
Expand Down

0 comments on commit a3ef594

Please sign in to comment.