Build native dependencies with UWP compatibility.

This commit is contained in:
Josh Matthews 2019-09-11 11:52:30 -04:00
parent 86ad84198e
commit dcbec3e404
4 changed files with 16 additions and 10 deletions

16
Cargo.lock generated
View file

@ -2553,7 +2553,7 @@ dependencies = [
"layout_thread_2020 0.0.1",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"media 0.0.1",
"mozangle 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"mozangle 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net 0.0.1",
"net_traits 0.0.1",
@ -2913,7 +2913,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mozangle"
version = "0.2.5"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2925,20 +2925,20 @@ dependencies = [
[[package]]
name = "mozjs"
version = "0.12.0"
source = "git+https://github.com/servo/rust-mozjs#92136c0b9a1efba2eb18b4400669278705816027"
source = "git+https://github.com/servo/rust-mozjs#a09f2a8b877e6f584e65c41f1711422bfbcc4332"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.67.0 (git+https://github.com/servo/mozjs?rev=2bf4912a6ff1f5ea333afb1cb53dfe9361157b14)",
"mozjs_sys 0.67.0 (git+https://github.com/servo/mozjs?rev=9ad6d4b2b5478521b7731c700c8f56e25597e520)",
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozjs_sys"
version = "0.67.0"
source = "git+https://github.com/servo/mozjs?rev=2bf4912a6ff1f5ea333afb1cb53dfe9361157b14#2bf4912a6ff1f5ea333afb1cb53dfe9361157b14"
source = "git+https://github.com/servo/mozjs?rev=9ad6d4b2b5478521b7731c700c8f56e25597e520#9ad6d4b2b5478521b7731c700c8f56e25597e520"
dependencies = [
"bindgen 0.49.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3909,7 +3909,7 @@ dependencies = [
"mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
"mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mozangle 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"mozangle 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs 0.12.0 (git+https://github.com/servo/rust-mozjs)",
"msg 0.0.1",
"net_traits 0.0.1",
@ -6072,9 +6072,9 @@ dependencies = [
"checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226"
"checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f"
"checksum moite_moite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb5a94c61e12e2cfc16ee3e2b6eca8f126a43c888586626337544a7e824a1af"
"checksum mozangle 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0643469d6622a4ffae6a74f13e78a32bfa1406fe8a63010b3fbf2946797fdac7"
"checksum mozangle 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "75a61b5a06b6f362eb45590ddf2643c255768a7039bcde1dc70320b97e7f9651"
"checksum mozjs 0.12.0 (git+https://github.com/servo/rust-mozjs)" = "<none>"
"checksum mozjs_sys 0.67.0 (git+https://github.com/servo/mozjs?rev=2bf4912a6ff1f5ea333afb1cb53dfe9361157b14)" = "<none>"
"checksum mozjs_sys 0.67.0 (git+https://github.com/servo/mozjs?rev=9ad6d4b2b5478521b7731c700c8f56e25597e520)" = "<none>"
"checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729"
"checksum muldiv 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "451a9a05d2a32c566c897835e0ea95cf79ed2fdfe957924045a1721a36c9980f"
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"

View file

@ -20,6 +20,7 @@ webidl_lint = ["script_plugins/webidl_lint"]
default = ["unrooted_must_root_lint", "webidl_lint"]
webgl_backtrace = ["backtrace", "canvas_traits/webgl_backtrace"]
js_backtrace = ["backtrace"]
uwp = ["js/uwp"]
[build-dependencies]
cmake = "0.1"
@ -27,7 +28,7 @@ phf_codegen = "0.7"
phf_shared = "0.7"
serde_json = "1.0"
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
[target.'cfg(target_os = "linux")'.dependencies]
tinyfiledialogs = "3.0"
[dependencies]

View file

@ -25,7 +25,7 @@ layout-2020 = ["layout_thread_2020"]
max_log_level = ["log/release_max_level_info"]
native-bluetooth = ["bluetooth/native-bluetooth"]
no_wgl = ["canvas/no_wgl"]
uwp = ["servo_config/uwp"]
uwp = ["servo_config/uwp", "script/uwp"]
webrender_debugger = ["webrender/debugger"]
no_static_freetype = ["webrender/no_static_freetype"]
oculusvr = ["webvr/oculusvr"]

View file

@ -626,6 +626,11 @@ class MachCommands(CommandBase):
if sys.platform == "win32":
env.setdefault("CC", "clang-cl.exe")
env.setdefault("CXX", "clang-cl.exe")
if uwp:
env.setdefault("CFLAGS", "")
env.setdefault("CXXFLAGS", "")
env["CFLAGS"] += " -DWINAPI_FAMILY=WINAPI_FAMILY_APP"
env["CXXFLAGS"] += " -DWINAPI_FAMILY=WINAPI_FAMILY_APP"
else:
env.setdefault("CC", "clang")
env.setdefault("CXX", "clang++")