diff --git a/Cargo.lock b/Cargo.lock index 0dcf274cca2..1d3acb93b9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2571,7 +2571,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", @@ -2932,7 +2932,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)", @@ -2944,20 +2944,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)", @@ -3588,11 +3588,11 @@ dependencies = [ "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3612,13 +3612,13 @@ name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", ] [[package]] name = "rand_core" version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp#13b836653183635c0bae3171a63f6faaf6d41809" [[package]] name = "rand_hc" @@ -3642,19 +3642,19 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_os" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp#13b836653183635c0bae3171a63f6faaf6d41809" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3665,7 +3665,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", ] [[package]] @@ -3928,7 +3928,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", @@ -4476,7 +4476,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6117,9 +6117,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)" = "" -"checksum mozjs_sys 0.67.0 (git+https://github.com/servo/mozjs?rev=2bf4912a6ff1f5ea333afb1cb53dfe9361157b14)" = "" +"checksum mozjs_sys 0.67.0 (git+https://github.com/servo/mozjs?rev=9ad6d4b2b5478521b7731c700c8f56e25597e520)" = "" "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" @@ -6177,11 +6177,11 @@ dependencies = [ "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" +"checksum rand_core 0.4.2 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)" = "" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_os 0.1.3 (git+https://github.com/servo/rand?branch=servo-rand_os-0.1.3-uwp)" = "" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum raqote 0.6.5-alpha.0 (git+https://github.com/jrmuizel/raqote)" = "" diff --git a/Cargo.toml b/Cargo.toml index 97e2f43df59..209e805937a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,3 +28,6 @@ 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" } +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" } + diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 957f45ad9bd..7df8d9ced1a 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -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] diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 10bb31d2405..b842f44ad21 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -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"] diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index f5ea9739391..3afe06390cf 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -618,6 +618,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++")