diff options
author | Josh Matthews <josh@joshmatthews.net> | 2019-05-30 13:04:45 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2019-06-03 10:41:17 -0400 |
commit | 96c51cf173ce3cb1526fe58f904e67ffc771893d (patch) | |
tree | c3f68760f38adc54e047036b96b34e69ebbc7f17 | |
parent | 8ae287375f9c711ea108ff0255e08eb4ae1e7691 (diff) | |
download | servo-96c51cf173ce3cb1526fe58f904e67ffc771893d.tar.gz servo-96c51cf173ce3cb1526fe58f904e67ffc771893d.zip |
Package DLLs correctly for Windows cross builds.
-rw-r--r-- | etc/taskcluster/decision_task.py | 5 | ||||
-rw-r--r-- | python/servo/build_commands.py | 4 | ||||
-rw-r--r-- | python/servo/command_base.py | 4 | ||||
-rw-r--r-- | python/servo/package_commands.py | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 9c9686f0573..604c94cf12b 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -358,14 +358,17 @@ def android_x86_wpt(): def windows_x86(): return ( - windows_build_task("Dev build", package=False, arch="x86") + windows_build_task("Dev build", arch="x86") .with_treeherder("Windows x86") .with_env(**{ "VCVARSALL_PATH": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Auxiliary\\Build" }) .with_script( "python mach build --dev --target i686-pc-windows-msvc", + "python mach package --dev --target i686-pc-windows-msvc", ) + .with_artifacts("repo/target/i686-pc-windows-msvc/debug/msi/Servo.exe", + "repo/target/i686-pc-windows-msvc/debug/msi/Servo.zip") .find_or_create("build.windows_x86_dev." + CONFIG.task_id()) ) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 1a00d8be97d..a491d0a0bd5 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -615,7 +615,8 @@ class MachCommands(CommandBase): return rv if sys.platform == "win32": - servo_exe_dir = path.join(base_path, "debug" if dev else "release") + servo_exe_dir = os.path.dirname(self.get_binary_path(release, dev, target=target)) + assert os.path.exists(servo_exe_dir) msvc_x64 = "64" if "x86_64" in (target or host_triple()) else "" # on msvc builds, use editbin to change the subsystem to windows, but only @@ -629,6 +630,7 @@ class MachCommands(CommandBase): servo_exe_dir) # Search for the generated nspr4.dll build_path = path.join(servo_exe_dir, "build") + assert os.path.exists(build_path) def package_generated_shared_libraries(libs, build_path, servo_exe_dir): for root, dirs, files in os.walk(build_path): diff --git a/python/servo/command_base.py b/python/servo/command_base.py index a7e6ead3bf0..2251b620098 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -367,7 +367,7 @@ class CommandBase(object): def get_gstreamer_path(self): return path.join(self.context.topdir, "support", "linux", "gstreamer", "gst") - def get_binary_path(self, release, dev, android=False, magicleap=False): + def get_binary_path(self, release, dev, target=None, android=False, magicleap=False): # TODO(autrilla): this function could still use work - it shouldn't # handle quitting, or printing. It should return the path, or an error. base_path = self.get_target_dir() @@ -380,6 +380,8 @@ class CommandBase(object): elif android: base_path = path.join(base_path, "android", self.config["android"]["target"]) binary_name = "libsimpleservo.so" + elif target: + base_path = path.join(base_path, target) release_path = path.join(base_path, "release", binary_name) dev_path = path.join(base_path, "debug", binary_name) diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 12ab0607a3a..491abf2eb84 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -219,7 +219,7 @@ class PackageCommands(CommandBase): if magicleap: target = "aarch64-linux-android" env = self.build_env(target=target) - binary_path = self.get_binary_path(release, dev, android=android, magicleap=magicleap) + binary_path = self.get_binary_path(release, dev, target=target, android=android, magicleap=magicleap) dir_to_root = self.get_top_dir() target_dir = path.dirname(binary_path) if magicleap: |