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 -->
This commit is contained in:
bors-servo 2019-09-20 11:22:02 -04:00 committed by GitHub
commit b3c2bed84b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 21 deletions

View file

@ -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++")