diff --git a/.cargo/config b/.cargo/config
index 4498011d9e39..9df45ac6ba92 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -25,8 +25,14 @@ ar = "aarch64-linux-gnu-ar"
[target.x86_64-pc-windows-msvc]
linker = "lld-link.exe"
+[target.x86_64-uwp-windows-msvc]
+linker = "lld-link.exe"
+
[target.i686-pc-windows-msvc]
linker = "lld-link.exe"
[target.aarch64-pc-windows-msvc]
linker = "lld-link.exe"
+
+[target.aarch64-uwp-windows-msvc]
+linker = "lld-link.exe"
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index d91697766824..b16e963c219d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -150,9 +150,8 @@ dependencies = [
[[package]]
name = "autocfg"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf"
+version = "0.1.6"
+source = "git+https://github.com/servo/autocfg?branch=rustflags#d040e25ff6c129189306011f6a0ff210e08227a0"
[[package]]
name = "azure"
@@ -185,9 +184,9 @@ dependencies = [
[[package]]
name = "backtrace"
-version = "0.3.35"
+version = "0.3.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1371048253fa3bac6704bfd6bbfc922ee9bdcee8881330d40f308b81cc5adc55"
+checksum = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5"
dependencies = [
"backtrace-sys",
"cfg-if",
@@ -502,11 +501,12 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.35"
+version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83"
+checksum = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be"
dependencies = [
- "rayon",
+ "jobserver",
+ "num_cpus",
]
[[package]]
@@ -1467,6 +1467,17 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05"
+[[package]]
+name = "getrandom"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
[[package]]
name = "gfx"
version = "0.0.1"
@@ -2358,6 +2369,17 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+[[package]]
+name = "jobserver"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160"
+dependencies = [
+ "getrandom",
+ "libc",
+ "log",
+]
+
[[package]]
name = "jpeg-decoder"
version = "0.1.14"
@@ -3075,7 +3097,7 @@ dependencies = [
[[package]]
name = "mozjs"
version = "0.12.1"
-source = "git+https://github.com/servo/rust-mozjs#bc44e221420a42ccb77b54911f60ca102cba143b"
+source = "git+https://github.com/servo/rust-mozjs#0832eb778689143cd9f2f3967fac912f7096a466"
dependencies = [
"cc",
"lazy_static",
@@ -3088,7 +3110,7 @@ dependencies = [
[[package]]
name = "mozjs_sys"
version = "0.67.1"
-source = "git+https://github.com/servo/mozjs?rev=dd175ee73a179ce218286c4be4ab80e1a75348be#dd175ee73a179ce218286c4be4ab80e1a75348be"
+source = "git+https://github.com/servo/mozjs?rev=59065889ec7726b767d70b8702b43b4e4776cbfe#59065889ec7726b767d70b8702b43b4e4776cbfe"
dependencies = [
"bindgen",
"cc",
@@ -5710,6 +5732,12 @@ dependencies = [
"urlencoding",
]
+[[package]]
+name = "wasi"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
+
[[package]]
name = "wayland-client"
version = "0.21.13"
@@ -5965,9 +5993,8 @@ dependencies = [
[[package]]
name = "winapi"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
+version = "0.3.8"
+source = "git+https://github.com/servo/winapi-rs?branch=patch-1#f85c3541bbb331fea8918ac070accfb4ab613e7b"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
@@ -5976,8 +6003,7 @@ dependencies = [
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+source = "git+https://github.com/servo/winapi-rs?branch=patch-1#f85c3541bbb331fea8918ac070accfb4ab613e7b"
[[package]]
name = "winapi-util"
@@ -5991,8 +6017,7 @@ dependencies = [
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+source = "git+https://github.com/servo/winapi-rs?branch=patch-1#f85c3541bbb331fea8918ac070accfb4ab613e7b"
[[package]]
name = "wincolor"
diff --git a/Cargo.toml b/Cargo.toml
index 4d8b77c98ba8..f054327d2673 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,4 +29,7 @@ opt-level = 3
mio = { git = "https://github.com/servo/mio.git", branch = "servo" }
rand_os = { git = "https://github.com/servo/rand", branch = "servo-rand_os-0.1.3-uwp" }
rand_core = { git = "https://github.com/servo/rand", branch = "servo-rand_os-0.1.3-uwp" }
-
+# https://github.com/cuviper/autocfg/pull/10
+autocfg = { git = "https://github.com/servo/autocfg", branch = "rustflags" }
+# https://github.com/retep998/winapi-rs/pull/816
+winapi = { git = "https://github.com/servo/winapi-rs", branch = "patch-1" }
diff --git a/Xargo.toml b/Xargo.toml
new file mode 100644
index 000000000000..147805d63d47
--- /dev/null
+++ b/Xargo.toml
@@ -0,0 +1,7 @@
+[target.x86_64-uwp-windows-msvc.dependencies]
+std = { features = ["panic-unwind"] }
+
+# https://github.com/rust-lang/rust/issues/65313
+[target.aarch64-uwp-windows-msvc.dependencies]
+std = {}
+
diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py
index 55c4002bd7c8..a42cd2fac697 100644
--- a/etc/taskcluster/decision_task.py
+++ b/etc/taskcluster/decision_task.py
@@ -390,8 +390,8 @@ def windows_arm64():
windows_build_task("UWP dev build", arch="arm64", package=False)
.with_treeherder("Windows arm64")
.with_script(
- "python mach build --dev --uwp --win-arm64",
- "python mach package --dev --target aarch64-pc-windows-msvc --uwp=arm64",
+ "python mach build --dev --target=aarch64-uwp-windows-msvc",
+ "python mach package --dev --target aarch64-uwp-windows-msvc --uwp=arm64",
)
.with_artifacts(appx_artifact(debug=True))
.find_or_create("build.windows_uwp_arm64_dev." + CONFIG.task_id())
@@ -403,8 +403,8 @@ def windows_uwp_x64():
windows_build_task("UWP dev build", package=False)
.with_treeherder("Windows x64")
.with_script(
- "mach build --dev --uwp",
- "mach package --dev --uwp=x64",
+ "python mach build --dev --target=x86_64-uwp-windows-msvc",
+ "python mach package --dev --target=x86_64-uwp-windows-msvc --uwp=x64",
)
.with_artifacts(appx_artifact(debug=True))
.find_or_create("build.windows_uwp_x64_dev." + CONFIG.task_id())
@@ -418,9 +418,9 @@ def uwp_nightly():
.with_features("taskclusterProxy")
.with_scopes("secrets:get:project/servo/s3-upload-credentials")
.with_script(
- "mach build --release --uwp",
- "python mach build --release --uwp --win-arm64",
- "mach package --release --uwp=x64 --uwp=arm64",
+ "python mach build --release --target=x86_64-uwp-windows-msvc",
+ "python mach build --release --target=aarch64-uwp-windows-msvc",
+ "mach package --release --target=x86_64-uwp-windows-msvc --uwp=x64 --uwp=arm64",
"mach upload-nightly uwp --secret-from-taskcluster",
)
.with_artifacts(appx_artifact(debug=False))
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index b43433924793..73698c3f3b51 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -164,17 +164,18 @@ class MachCommands(CommandBase):
@CommandArgument('--very-verbose', '-vv',
action='store_true',
help='Print very verbose output')
- @CommandArgument('--win-arm64', action='store_true', help="Use arm64 Windows target")
@CommandArgument('params', nargs='...',
help="Command-line arguments to be passed through to Cargo")
@CommandBase.build_like_command_arguments
def build(self, release=False, dev=False, jobs=None, params=None,
no_package=False, verbose=False, very_verbose=False,
- target=None, android=False, magicleap=False, libsimpleservo=False, uwp=False,
- features=None, win_arm64=False, **kwargs):
+ target=None, android=False, magicleap=False, libsimpleservo=False,
+ features=None, **kwargs):
opts = params or []
features = features or []
+
target, android = self.pick_target_triple(target, android, magicleap)
+ uwp = target and 'uwp' in target
target_path = base_path = self.get_target_dir()
if android:
@@ -220,14 +221,8 @@ def build(self, release=False, dev=False, jobs=None, params=None,
if very_verbose:
opts += ["-vv"]
- if win_arm64:
- if target:
- print("Can't specify explicit --target value with --win-arm64.")
- sys.exit(1)
- target = "aarch64-pc-windows-msvc"
-
if target:
- if self.config["tools"]["use-rustup"]:
+ if self.config["tools"]["use-rustup"] and not uwp:
# 'rustup target add' fails if the toolchain is not installed at all.
self.call_rustup_run(["rustc", "--version"])
@@ -265,6 +260,10 @@ def build(self, release=False, dev=False, jobs=None, params=None,
env['PKG_CONFIG_ALLOW_CROSS'] = "1"
if uwp:
+ # Ensure libstd is ready for the new UWP target.
+ check_call(["rustup", "component", "add", "rust-src"])
+ env['RUST_SYSROOT'] = path.expanduser('~\\.xargo')
+
# Don't try and build a desktop port.
libsimpleservo = True
@@ -943,7 +942,7 @@ def package_msvc_dlls(servo_exe_dir, target, vcinstalldir, vs_version):
"msvcp140.dll",
"vcruntime140.dll",
]
- if target_arch != "aarch64" and vs_version in ("14.0", "15.0", "16.0"):
+ if target_arch != "aarch64" and "uwp" not in target and vs_version in ("14.0", "15.0", "16.0"):
msvc_deps += ["api-ms-win-crt-runtime-l1-1-0.dll"]
# Check if it's Visual C++ Build Tools or Visual Studio 2015
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 90623613489f..7f4e941a4c79 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -634,6 +634,7 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit
extra_path += [path.join(self.msvc_package_dir("llvm"), "bin")]
extra_path += [path.join(self.msvc_package_dir("ninja"), "bin")]
extra_path += [self.msvc_package_dir("nuget")]
+ extra_path += [path.join(self.msvc_package_dir("xargo"))]
arch = (target or host_triple()).split('-')[0]
vcpkg_arch = {
@@ -821,11 +822,6 @@ def build_like_command_arguments(decorated_function):
action='store_true',
help='Build with frame pointer enabled, used by the background hang monitor.',
),
- CommandArgument(
- '--uwp',
- default=None,
- action='store_true',
- help='Build for HoloLens (x64)'),
CommandArgument('--with-raqote', default=None, action='store_true'),
CommandArgument('--with-layout-2020', default=None, action='store_true'),
CommandArgument('--without-wgl', default=None, action='store_true'),
@@ -912,7 +908,10 @@ def run_cargo_build_like_command(
assert "--features" not in cargo_args
args += ["--features", " ".join(features)]
- return self.call_rustup_run(["cargo", command] + args + cargo_args, env=env, verbose=verbose)
+ if target and 'uwp' in target:
+ return call(["xargo", command] + args + cargo_args, env=env, verbose=verbose)
+ else:
+ return self.call_rustup_run(["cargo", command] + args + cargo_args, env=env, verbose=verbose)
def android_support_dir(self):
return path.join(self.context.topdir, "support", "android")
diff --git a/python/servo/packages.py b/python/servo/packages.py
index 0af54b4aad57..bd36d2137f5b 100644
--- a/python/servo/packages.py
+++ b/python/servo/packages.py
@@ -11,4 +11,5 @@
"openssl": "111.3.0+1.1.1c-vs2017-2019-09-18",
"gstreamer-uwp": "1.16.0.5",
"openxr-loader-uwp": "1.0",
+ "xargo": "v0.3.16",
}
diff --git a/support/hololens/ServoApp/Package.appxmanifest b/support/hololens/ServoApp/Package.appxmanifest
index 5c706ebafaa6..af3a17005e67 100644
--- a/support/hololens/ServoApp/Package.appxmanifest
+++ b/support/hololens/ServoApp/Package.appxmanifest
@@ -40,4 +40,4 @@
-
\ No newline at end of file
+
diff --git a/support/hololens/ServoApp/ServoApp.vcxproj b/support/hololens/ServoApp/ServoApp.vcxproj
index ad16700df6b8..791409c44eb2 100644
--- a/support/hololens/ServoApp/ServoApp.vcxproj
+++ b/support/hololens/ServoApp/ServoApp.vcxproj
@@ -87,33 +87,37 @@
_DEBUG;%(PreprocessorDefinitions)
- $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\aarch64-pc-windows-msvc\debug\
- $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\debug\
+ $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\aarch64-uwp-windows-msvc\debug\
+ $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\x86_64-uwp-windows-msvc\debug\
WindowsApp.lib;%(AdditionalDependencies);simpleservo.dll.lib
- $(ProjectDir)\..\..\..\target\aarch64-pc-windows-msvc\debug\
+ $(ProjectDir)\..\..\..\target\aarch64-uwp-windows-msvc\debug\
+ $(ProjectDir)\..\..\..\target\aarch64-uwp-windows-msvc\debug\deps
WindowsApp.lib;%(AdditionalDependencies);simpleservo.dll.lib
- $(ProjectDir)\..\..\..\target\debug\
+ $(ProjectDir)\..\..\..\target\x86_64-uwp-windows-msvc\debug\
+ $(ProjectDir)\..\..\..\target\x86_64-uwp-windows-msvc\debug\deps
NDEBUG;%(PreprocessorDefinitions)
- $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\aarch64-pc-windows-msvc\release
- $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\release
+ $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\aarch64-uwp-windows-msvc\release
+ $(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories);$(ProjectDir)\..\..\..\target\x86_64-uwp-windows-msvc\release
WindowsApp.lib;%(AdditionalDependencies);simpleservo.dll.lib
- $(ProjectDir)\..\..\..\target\aarch64-pc-windows-msvc\release\
+ $(ProjectDir)\..\..\..\target\aarch64-uwp-windows-msvc\release\
+ $(ProjectDir)\..\..\..\target\aarch64-uwp-windows-msvc\release\deps
WindowsApp.lib;%(AdditionalDependencies);simpleservo.dll.lib
- $(ProjectDir)\..\..\..\target\release\
+ $(ProjectDir)\..\..\..\target\x86_64-uwp-windows-msvc\release\
+ $(ProjectDir)\..\..\..\target\x86_64-uwp-windows-msvc\release\deps
@@ -145,731 +149,723 @@
Designer
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
- true
-
-
+
true
true
false
true
false
-
+
true
-
+
true
-
+
true
-
+
true
true
false
true
false
-
+
true
true
false
true
false
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
-
-
- true
-
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
true
-
+
- true
+ false
-
+
true
-
+
true
-
+
true
true
false
@@ -877,21 +873,21 @@
false
-
+
true
-
+
true
-
+
- true
+ false
-
+
true
-
+
true
diff --git a/support/hololens/ServoApp/ServoApp.vcxproj.filters b/support/hololens/ServoApp/ServoApp.vcxproj.filters
index 73859388feb9..1254ed98b3cc 100644
--- a/support/hololens/ServoApp/ServoApp.vcxproj.filters
+++ b/support/hololens/ServoApp/ServoApp.vcxproj.filters
@@ -158,731 +158,725 @@
-
- DebugServoDLLs
-
-
- DebugServoDLLs
-
-
+
ReleaseServoDLLs
-
- DebugServoDLLs
-
-
+
ReleaseServoDLLs
-
+
ReleaseServoDLLs
-
+
DebugARM64ServoDLLs
-
+
DebugARM64ServoDLLs
-
+
DebugARM64ServoDLLs
-
+
ReleaseARM64ServoDLLs
-
+
ReleaseARM64ServoDLLs
-
+
ReleaseARM64ServoDLLs
-
+
ReleaseServoDLLs
-
- DebugServoDLLs
+
+