diff options
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/build_commands.py | 23 | ||||
-rw-r--r-- | python/servo/command_base.py | 8 |
2 files changed, 17 insertions, 14 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index a3aae798eac..a0ad4b9d615 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -193,7 +193,9 @@ class MachCommands(CommandBase): if not uwp: uwp = target and 'uwp' in target - features += self.pick_media_stack(media_stack, target) + media_stack = self.pick_media_stack(media_stack, target) + features += media_stack + has_media_stack = media_stack[0] == "media-gstreamer" target_path = base_path = self.get_target_dir() if android: @@ -650,15 +652,7 @@ class MachCommands(CommandBase): for key in env: print((key, env[key])) - if sys.platform == "win32": - env.setdefault("CC", "clang-cl.exe") - env.setdefault("CXX", "clang-cl.exe") - if uwp: - env.setdefault("TARGET_CFLAGS", "") - env.setdefault("TARGET_CXXFLAGS", "") - env["TARGET_CFLAGS"] += " -DWINAPI_FAMILY=WINAPI_FAMILY_APP" - env["TARGET_CXXFLAGS"] += " -DWINAPI_FAMILY=WINAPI_FAMILY_APP" - else: + if sys.platform != "win32": env.setdefault("CC", "clang") env.setdefault("CXX", "clang++") @@ -725,9 +719,10 @@ class MachCommands(CommandBase): status = 1 # copy needed gstreamer DLLs in to servo.exe dir - print("Packaging gstreamer DLLs") - if not package_gstreamer_dlls(env, servo_exe_dir, target_triple, uwp): - status = 1 + if has_media_stack: + print("Packaging gstreamer DLLs") + if not package_gstreamer_dlls(env, servo_exe_dir, target_triple, uwp): + status = 1 # UWP app packaging already bundles all required DLLs for us. print("Packaging MSVC DLLs") @@ -740,7 +735,7 @@ class MachCommands(CommandBase): ) assert os.path.exists(servo_exe_dir) - if not package_gstreamer_dylibs(servo_exe_dir): + if has_media_stack and not package_gstreamer_dylibs(servo_exe_dir): return 1 # On the Mac, set a lovely icon. This makes it easier to pick out the Servo binary in tools diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 0ba6a823756..1a5cc75e746 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -609,6 +609,14 @@ install them, let us know by filing a bug!") extra_path += [path.join(self.msvc_package_dir("ninja"), "bin")] extra_path += [self.msvc_package_dir("nuget")] + env.setdefault("CC", "clang-cl.exe") + env.setdefault("CXX", "clang-cl.exe") + if uwp: + env.setdefault("TARGET_CFLAGS", "") + env.setdefault("TARGET_CXXFLAGS", "") + env["TARGET_CFLAGS"] += " -DWINAPI_FAMILY=WINAPI_FAMILY_APP" + env["TARGET_CXXFLAGS"] += " -DWINAPI_FAMILY=WINAPI_FAMILY_APP" + arch = (target or host_triple()).split('-')[0] vcpkg_arch = { "x86_64": "x64-windows", |