diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-09-20 11:22:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 11:22:02 -0400 |
commit | b3c2bed84bf3c507698c2b265593061b6138525b (patch) | |
tree | f3ce58afd29799e4a1041ad1ae8047c62d23bf0d /python/servo/build_commands.py | |
parent | 293ccd07e8031dc0040d58c25621eac6e7c41df0 (diff) | |
parent | 51353c60ffb21a0df4d8df33db397dccbe4be90a (diff) | |
download | servo-b3c2bed84bf3c507698c2b265593061b6138525b.tar.gz servo-b3c2bed84bf3c507698c2b265593061b6138525b.zip |
Auto merge of #24185 - jdm:uwp-native-build, r=asajeffrey
Fix many WACK errors
These changes ensure that all native dependencies are built with the compiler flags that will prevent forbidden API uses. They also incorporate a fork of rand_os that backports UWP support from more recent rand releases. This is necessary in the short term to avoid having to wait for the entire ecosystem to migrate to the most recent rand release.
Depends on https://github.com/servo/mozjs/pull/200 and https://github.com/servo/rust-mozjs/pull/471.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because no windows WACK tests
<!-- 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/24185)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 5 |
1 files changed, 5 insertions, 0 deletions
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++") |