Skip to content
Permalink
Browse files

Build native dependencies with UWP compatibility.

  • Loading branch information...
jdm committed Sep 11, 2019
1 parent 86ad841 commit 3684ed84d1b97f605779a6aa4375aa4855a4751b
Showing with 23 additions and 12 deletions.
  1. +10 −10 Cargo.lock
  2. +5 −0 Cargo.toml
  3. +2 −1 components/script/Cargo.toml
  4. +1 −1 components/servo/Cargo.toml
  5. +5 −0 python/servo/build_commands.py

Some generated files are not rendered by default. Learn more.

@@ -28,3 +28,8 @@ 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" }

[patch."https://github.com/servo/mozjs"]
mozjs_sys = { git = "https://github.com/jdm/mozjs", branch = "uwp-rustc-with-cpp-changes" }
[patch."https://github.com/servo/rust-mozjs"]
mozjs = { git = "https://github.com/jdm/rust-mozjs", branch = "uwp" }
@@ -20,14 +20,15 @@ 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"
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]
@@ -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"]
@@ -626,6 +626,11 @@ def build(self, release=False, dev=False, jobs=None, params=None,
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++")

0 comments on commit 3684ed8

Please sign in to comment.
You can’t perform that action at this time.