diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-09-30 12:17:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-30 12:17:37 -0500 |
commit | 2567c40829704dcb1c7769defffb9dabfd701633 (patch) | |
tree | 7b87ee23604b0ad222d9b4a9626a1e7d47fa64d6 /python/servo/build_commands.py | |
parent | 75a4dcf293a6de9bc7ae180f25ea010dd3a667bc (diff) | |
parent | e93130026a62b5c20187e99fda8db97f2b5a36e1 (diff) | |
download | servo-2567c40829704dcb1c7769defffb9dabfd701633.tar.gz servo-2567c40829704dcb1c7769defffb9dabfd701633.zip |
Auto merge of #18680 - MortimerGoro:android_flavors, r=larsbergstrom
Implement Gradle flavors for Android VR compilations
<!-- Please describe your changes on the following line: -->
This PR adds support to easily generate Android VR builds. Rust/Java VR dependencies are not added by default.
Default build (No VR support)
```
./mach build --release --android
./mach package --release --android
./mach install --release --android
```
GoogleVR builds (e.g. Daydream)
```
./mach build --release --android --features googlevr
./mach package --release --android --flavor googlevr
./mach install --release --android
```
OculusVR builds (e.g. Gear VR)
```
./mach build --release --android --features oculusvr
./mach package --release --android --flavor oculusvr
./mach install --release --android
```
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/18680)
<!-- 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 e78ff374daa..97ac6c07613 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -309,6 +309,11 @@ class MachCommands(CommandBase): env['CPPFLAGS'] = ' '.join(["--sysroot", env['ANDROID_SYSROOT']]) env["CMAKE_ANDROID_ARCH_ABI"] = self.config["android"]["lib"] env["CMAKE_TOOLCHAIN_FILE"] = path.join(self.android_support_dir(), "toolchain.cmake") + # Set output dir for gradle aar files + aar_out_dir = self.android_aar_dir() + if not os.path.exists(aar_out_dir): + os.makedirs(aar_out_dir) + env["AAR_OUT_DIR"] = aar_out_dir cargo_binary = "cargo" + BIN_SUFFIX |