-
Notifications
You must be signed in to change notification settings - Fork 4
Building ANGLE for UWP
Philip Lamb edited this page Jul 23, 2021
·
13 revisions
Servo for Unity on Windows UWP reuses Servo's custom-compiled NuGet ANGLE package. Thus, moving Servo for Unity to a new ANGLE version requires us to update the ANGLE package used by Servo itself. The package is a recent core ANGLE version with some patches (to enable mutexes on D3D11 surfaces).
- To update, first determine which version of ANGLE you want to update to. (Instructions at https://chromium.googlesource.com/angle/angle/+/HEAD/doc/ChoosingANGLEBranch.md recommend using OmahaProxy tool http://omahaproxy.appspot.com/ to find the Chromium version for a beta or stable release, and then find that branch in the ANGLE repo).
- Check out this branch from the core repo https://github.com/google/angle.git (e.g. chromium/nnnn where nnnn is the version number).
- Add https://github.com/servo/ms-angle/ as a remote, and check out the most recent branch
servo-master-yyyy-mm-dd
. - Add a new branch servo-master-yyyy-mm-dd with the current date and the previous one as root.
- Rebase this branch onto the chosen Chromium base branch (checked out in step 2), resolving any conflicts as the rebase proceeds.
- Follow the instructions at https://chromium.googlesource.com/angle/angle/+/refs/heads/main/doc/DevSetup.md to set up Google's toolchain (gclient, ninja, etc).
-
python scripts\bootstap.py
-> creates.gclient
. gclient sync
-
gn args out\Release-x64
(can be prefixed withgn clean out\Release-x64
if rebuilding after a previous build).
target_os = "winuwp"
target_cpu = "x64"
is_component_build = false
is_clang = false
is_debug = false
10 gn args out\Release-x86
target_os = "winuwp"
target_cpu = "x86"
is_component_build = false
is_clang = false
is_debug = false
gn args out\Release-arm64
target_os = "winuwp"
target_cpu = "arm64"
is_component_build = false
is_clang = false
is_debug = false
gn args out\Debug-x64
target_os = "winuwp"
target_cpu = "x64"
is_component_build = false
is_clang = false
is_debug = true
gn args out\Debug-x86
target_os = "winuwp"
target_cpu = "x86"
is_component_build = false
is_clang = false
is_debug = true
gn args out\Debug-arm64
target_os = "winuwp"
target_cpu = "arm64"
is_component_build = false
is_clang = false
is_debug = true
- Run the builds:
autoninja -C out\Release-x64
autoninja -C out\Release-x86
autoninja -C out\Release-arm64
autoninja -C out\Debug-x64
autoninja -C out\Debug-x86
autoninja -C out\Debug-arm64
- Update the version number in nuget\angle.nuspec to match the version number of ANGLE itself. The version number major and minor can be found in
src\common\angle_version.h
and the patch number is taken from the macroANGLE_COMMIT_POSITION
defined in angle_commit.h which is generated during compilation, and which can be found under the build directory at pathgen\angle\angle_commit.h
. - Create packages. There is a copy of nuget.exe in the Servo repo, at path
.servo\msvc-dependencies\nuget.exe
.
nuget pack nuget\angle.nuspec -Properties Configuration=Release
nuget pack nuget\angle.nuspec -Properties Configuration=Debug -Suffix debug
- Test the package locally with a Servo build. To do this:
- Modify the file
support\hololens\ServoApp\packages.config
, editing the version field in the package ANGLE.WindowsStore.Servo to match the value selected in step 16. - Place the package built above at some path, e.g.
C:\temp_packages
- Create a file named
NuGet.config
with the contents below, and place this file into the root of Servo's directory, editing the path as necessary:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="local" value="C:\temp_packages\" /> </packageSources> </configuration>
- Build servo for UWP.
- Modify the file
- Upload the resulting packages to https://www.nuget.org/packages/manage/upload
- Push to a new servo-master-YYYY-MM-DD branch