Skip to content

Commit

Permalink
Auto merge of #23468 - servo:jdm-patch-52, r=asajeffrey
Browse files Browse the repository at this point in the history
Add Windows arm64 build.

Depends on:
* [x] servo/mozjs#184
* [x] servo/rust-mozjs#463
* [ ] <strike>https://github.com/servo/ipc-channel/pull/232</strike>
* [x] rust-lang/cmake-rs#82
* [x] servo/surfman#136
* [x] servo/mozangle#21

<!-- 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/23468)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Jun 11, 2019
2 parents f63b404 + e9365ad commit 8e78357
Show file tree
Hide file tree
Showing 17 changed files with 338 additions and 246 deletions.
3 changes: 3 additions & 0 deletions .cargo/config
Expand Up @@ -27,3 +27,6 @@ linker = "lld-link.exe"

[target.i686-pc-windows-msvc]
linker = "lld-link.exe"

[target.aarch64-pc-windows-msvc]
linker = "lld-link.exe"
228 changes: 114 additions & 114 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -28,3 +28,5 @@ opt-level = 3
# Those are here to dedupe winapi since mio is still using winapi 0.2.
mio = { git = "https://github.com/servo/mio.git", branch = "servo" }
iovec = { git = "https://github.com/servo/iovec.git", branch = "servo" }
remove_dir_all = { git = "https://github.com/XAMPPRocky/remove_dir_all" }
cmake = { git = "https://github.com/alexcrichton/cmake-rs" }
Expand Up @@ -51,7 +51,10 @@ impl BackgroundHangMonitorRegister for HangMonitorRegister {
) -> Box<BackgroundHangMonitor> {
let bhm_chan = BackgroundHangMonitorChan::new(self.sender.clone(), component_id);

#[cfg(target_os = "windows")]
#[cfg(all(
target_os = "windows",
any(target_arch = "x86_64", target_arch = "x86")
))]
let sampler = crate::sampler_windows::WindowsSampler::new();
#[cfg(target_os = "macos")]
let sampler = crate::sampler_mac::MacOsSampler::new();
Expand Down
1 change: 1 addition & 0 deletions components/canvas/Cargo.toml
Expand Up @@ -15,6 +15,7 @@ azure_backend = ["azure"]
default = ["azure_backend"]
webgl_backtrace = ["canvas_traits/webgl_backtrace"]
raqote_backend = ["raqote"]
no_wgl = ["offscreen_gl_context/no_wgl"]

[dependencies]
azure = {git = "https://github.com/servo/rust-azure", optional = true}
Expand Down
1 change: 1 addition & 0 deletions components/constellation/Cargo.toml
Expand Up @@ -13,6 +13,7 @@ path = "lib.rs"
[features]
azure_backend = ["canvas/azure_backend"]
raqote_backend = ["canvas/raqote_backend"]
no_wgl = ["canvas/no_wgl"]

[dependencies]
background_hang_monitor = { path = "../background_hang_monitor"}
Expand Down
6 changes: 5 additions & 1 deletion components/constellation/pipeline.rs
Expand Up @@ -599,7 +599,11 @@ impl UnprivilegedPipelineContent {
}
}

#[cfg(any(target_os = "android", target_arch = "arm", target_arch = "aarch64"))]
#[cfg(any(
target_os = "android",
target_arch = "arm",
all(target_arch = "aarch64", not(target_os = "windows"))
))]
pub fn spawn_multiprocess(self) -> Result<(), Error> {
use ipc_channel::ipc::IpcOneShotServer;
// Note that this function can panic, due to process creation,
Expand Down
2 changes: 1 addition & 1 deletion components/script/Cargo.toml
Expand Up @@ -65,7 +65,7 @@ indexmap = "1.0.2"
ipc-channel = "0.11"
itertools = "0.8"
jstraceable_derive = {path = "../jstraceable_derive"}
js = {package = "mozjs", git = "https://github.com/servo/rust-mozjs", rev = "357d1db91e4e49c3f148fe05fdfae5f8f0834ca8"}
js = {package = "mozjs", git = "https://github.com/servo/rust-mozjs"}
keyboard-types = "0.4.4"
lazy_static = "1"
libc = "0.2"
Expand Down
1 change: 1 addition & 0 deletions components/servo/Cargo.toml
Expand Up @@ -20,6 +20,7 @@ googlevr = ["webvr/googlevr"]
js_backtrace = ["script/js_backtrace"]
max_log_level = ["log/release_max_level_info"]
native-bluetooth = ["bluetooth/native-bluetooth"]
no_wgl = ["canvas/no_wgl"]
raqote_backend = ["canvas/raqote_backend"]
webrender_debugger = ["webrender/debugger"]
no_static_freetype = ["webrender/no_static_freetype"]
Expand Down
66 changes: 48 additions & 18 deletions etc/taskcluster/decision_task.py
Expand Up @@ -32,6 +32,7 @@ def main(task_for):
linux_tidy_unit_docs,
windows_unit,
windows_x86,
windows_arm64,
macos_unit,
magicleap_dev,
android_arm32_dev,
Expand All @@ -58,9 +59,9 @@ def main(task_for):

"try-mac": [macos_unit],
"try-linux": [linux_tidy_unit_docs],
"try-windows": [windows_unit, windows_x86],
"try-windows": [windows_unit, windows_x86, windows_arm64],
"try-magicleap": [magicleap_dev],
"try-arm": [linux_arm32_dev, linux_arm64_dev],
"try-arm": [linux_arm32_dev, linux_arm64_dev, windows_arm64],
"try-wpt": [linux_wpt],
"try-wpt-mac": [macos_wpt],
"try-wpt-android": [android_x86_wpt],
Expand Down Expand Up @@ -134,6 +135,10 @@ def mocked_only():
"LIB": "%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\lib;%LIB%",
"GSTREAMER_1_0_ROOT_X86_64": "%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\",
},
"arm64": {
"PKG_CONFIG_ALLOW_CROSS": "1",
# No GStreamer support for arm64 windows yet.
},
"all": {
"PYTHON3": "%HOMEDRIVE%%HOMEPATH%\\python3\\python.exe",
"LINKER": "lld-link.exe",
Expand Down Expand Up @@ -359,11 +364,8 @@ def android_x86_wpt():

def windows_x86():
return (
windows_build_task("Dev build", arch="x86")
windows_cross_build_task("Dev build", arch="x86", package=True)
.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",
Expand All @@ -374,6 +376,20 @@ def windows_x86():
)


def windows_arm64():
return (
windows_cross_build_task("Dev build", arch="arm64", package=False)
.with_treeherder("Windows arm64")
.with_script(
"python mach build --dev --libsimpleservo \
--target aarch64-pc-windows-msvc \
--with-raqote \
--without-wgl",
)
.find_or_create("build.windows_arm64_dev." + CONFIG.task_id())
)


def windows_unit():
return (
windows_build_task("Dev build + unit tests")
Expand Down Expand Up @@ -703,6 +719,17 @@ def android_build_task(name):
)


def windows_cross_build_task(name, arch, package):
return (
windows_build_task(name, package, arch)
.with_env(**{
"VCINSTALLDIR_SERVO": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\",
"VisualStudioVersion": "15.0",
"WindowsSdkDir": "C:\\Program Files (x86)\\Windows Kits\\10\\",
})
)


def windows_build_task(name, package=True, arch="x86_64"):
hashes = {
"devel": {
Expand Down Expand Up @@ -735,19 +762,22 @@ def windows_build_task(name, package=True, arch="x86_64"):
path="python3",
)
.with_rustup()
.with_repacked_msi(
url=("https://gstreamer.freedesktop.org/data/pkg/windows/" +
"%s/gstreamer-1.0-%s-%s-%s.msi" % (version, prefix[arch], arch, version)),
sha256=hashes["non-devel"][arch],
path="gst",
)
.with_repacked_msi(
url=("https://gstreamer.freedesktop.org/data/pkg/windows/" +
"%s/gstreamer-1.0-devel-%s-%s-%s.msi" % (version, prefix[arch], arch, version)),
sha256=hashes["devel"][arch],
path="gst",
)
)
if arch in hashes["non-devel"] and arch in hashes["devel"]:
task = (
task.with_repacked_msi(
url=("https://gstreamer.freedesktop.org/data/pkg/windows/" +
"%s/gstreamer-1.0-%s-%s-%s.msi" % (version, prefix[arch], arch, version)),
sha256=hashes["non-devel"][arch],
path="gst",
)
.with_repacked_msi(
url=("https://gstreamer.freedesktop.org/data/pkg/windows/" +
"%s/gstreamer-1.0-devel-%s-%s-%s.msi" % (version, prefix[arch], arch, version)),
sha256=hashes["devel"][arch],
path="gst",
)
)
if package:
task = (
task
Expand Down
5 changes: 4 additions & 1 deletion etc/taskcluster/windows/first-boot.ps1
Expand Up @@ -77,8 +77,11 @@ $client.DownloadFile("https://aka.ms/vs/15/release/vs_buildtools.exe", "C:\vs_bu
Start-Process C:\vs_buildtools.exe -ArgumentList (`
"--passive --norestart --includeRecommended " +
"--add Microsoft.VisualStudio.Workload.VCTools " +
"--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 " +
"--add Microsoft.VisualStudio.Component.VC.ATL " +
"--add Microsoft.VisualStudio.Component.VC.ATLMFC"
"--add Microsoft.VisualStudio.Component.VC.ATL.ARM64 " +
"--add Microsoft.VisualStudio.Component.VC.ATLMFC " +
"--add Microsoft.VisualStudio.Component.VC.MFC.ARM64"
) -Wait


Expand Down
1 change: 1 addition & 0 deletions ports/libsimpleservo/api/Cargo.toml
Expand Up @@ -36,6 +36,7 @@ js_backtrace = ["libservo/js_backtrace"]
max_log_level = ["log/release_max_level_info"]
native-bluetooth = ["libservo/native-bluetooth"]
no_static_freetype = ["libservo/no_static_freetype"]
no_wgl = ["libservo/no_wgl"]
oculusvr = ["libservo/oculusvr"]
raqote_backend = ["libservo/raqote_backend"]
webdriver = ["libservo/webdriver"]
Expand Down
1 change: 1 addition & 0 deletions ports/libsimpleservo/capi/Cargo.toml
Expand Up @@ -30,6 +30,7 @@ googlevr = ["simpleservo/googlevr"]
js_backtrace = ["simpleservo/js_backtrace"]
max_log_level = ["simpleservo/max_log_level"]
native-bluetooth = ["simpleservo/native-bluetooth"]
no_wgl = ["simpleservo/no_wgl"]
oculusvr = ["simpleservo/oculusvr"]
raqote_backend = ["simpleservo/raqote_backend"]
unstable = ["simpleservo/unstable"]
Expand Down

0 comments on commit 8e78357

Please sign in to comment.