scripts/generate_android_bp.py


Log

Author Commit Date CI Message
Tim Van Patten 16a9a892 2021-07-12T15:30:57 Cleanup license data and remove Android.mk files In an effort to better satisfy the Android legal/license requirements: 1.) Cleanup the license data in the generated Android.bp. 2.) Remove unused Android.mk files. Bug: b/191882454 Change-Id: Ia1937c1e2e822e688cca2a4d3ebc9a294f67ad69 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3021851 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten a09052ea 2021-06-29T16:18:15 generate_android_bp.py: Don't include buildtools/third_party/libc++/ The buildtools/ directory is not included in the AOSP version of ANGLE and is unnecessary, so update generate_android_bp.py to filter out that include directory. Bug: b/187342779 Change-Id: I3a2d0506ac53f7d369597c797fffb211ffde41f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2995382 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten c40262dc 2021-06-10T17:27:45 Remove unused third_party/ deps from Android checkin Remove unused third_party/ deps from the Android checkins to reduce the license burden from unused libraries. Bug: b/187342779 Change-Id: I87358377d0dbbc644cb85555464f4afad9d5c333 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954924 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 4df2e8ce 2021-05-24T13:15:45 Reduce ANGLE APK size Add some flags to generate_android_bp.py to make the AOSP match the ANGLE build flags, which makes the CQ testing more relevant and reduces the ANGLE APK size. Additionally, disable various GN args that are no longer required (GL, ESSL, HSSL). Together, this reduces the ANGLE APK size in AOSP from 22.2MB to 16.7MB. This CL also makes some fixes to roll_aosp.sh that are suggested by "Shell Scipt". Bug: b/189125396 Test: manual verification Change-Id: Iea33de799a00ffff182cf028a6998e1ef01a00e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912933 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 51feebb4 2021-05-21T16:23:39 Add LOCAL_LICENSE_KINDS to generate_android_bp.py Upstread the AOSP license changes that keep getting reverted: https://android-review.googlesource.com/c/platform/external/angle/+/1704346 Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: third_party/android_ndk/sources/android/cpufeatures/Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-3.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT SPDX-license-identifier-Zlib legacy_unencumbered to: Android.bp via generate_android_bp.py Bug: b/186906888 Change-Id: I86081cfe2858702ed350ce8c72afaaa8eb5566b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912918 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 89ac8a44 2021-05-19T10:48:40 Fix Loading ANGLE.apk in Android The recent CL to remove the Settings GUI from the Android-built APK went a little too far removing Java code and emptying the AndroidManifest.xml. This resulted in ANGLE being unable to be loaded from the APK, since ANGLE was not able to respond to the intent android.app.action.ANGLE_FOR_ANDROID which indicates it contains ANGLE libraries. The AndroidManifest.xml requires various flags like android:forceQueryable="true" so the APK can be accessed by the framework. The assets/ directory was removed, which contains 'a4a_rules.json' and is required by GraphicsEnvironment. This is added back. Bug: b/187342779 Change-Id: Ic7b758c92ed12750972c7e313729276a13f76032 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2906632 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 417d912a 2021-05-05T18:20:27 Remove Settings GUI from AOSP Builds and make product-specific The Settings GUI is being removed from the AOSP build to turn the ANGLE APK into essentially a container APK containing the necessary libraries. This reduces the APK size and reduces the risk of users enabling ANGLE by accident. Additionally, ANGLE is being marked product-specific to remove it from all AOSP builds. Bug: b/187345862 Change-Id: I6e1acb9c6e07b419d40aee43d7260060027999ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2876213 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 57202fb0 2021-04-30T13:56:11 Fix Rolling ANGLE into AOSP Rolling ANGLE into AOSP currently generates several build errors. This CL fixes them. Bug: angleproject:5919 Bug: angleproject:5873 Change-Id: Ic24c3c27a2dd3a1db4d6d2e3642eb1b16148569a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2863883 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Lubosz Sarnecki 37752956 2021-02-11T16:12:48 Generators: Use fixed year in license headers. Remove dynamic year generation from generator scripts, as required by the Chromium C++ style guide. The dynamic year values were replaced by the current year at the time the file was created according to git log. The code to dynamically generate the year was removed. This patch also refreshes generated files and hashes. Bug: angleproject:5516 Change-Id: I735028bccb5c83217e92c380538f1abf0a906b2c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2690950 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jason Macnak d392af02 2021-01-12T10:08:31 Update roll AOSP scripts to reflect vulkan-deps subdirectory Performing a roll with this changes produces https://android-review.googlesource.com/c/1548235 Bug: b/147316305 Bug: angleproject:5456 Test: scripts/roll_aosp.sh && m ANGLE Change-Id: I0f5a698e81a1299abde7cfccb4e1467c8dc02aad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2625168 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jason Macnak 2c65da28 2021-01-08T11:49:18 Default roll_aosp.sh to copy artifacts to vendor partition ... to support using ANGLE as a native GL driver. Note: this will not affect devices installing the APK with `PRODUCT_PACKAGES += ANGLE` and will *not* also install the libs to vendor. Bug: b/147316305 Bug: angleproject:5456 Test: ./scripts/roll_aosp.sh and build in AOSP Change-Id: I98cab8d0735a4f66293ac063e0eef2ae7ddbee7b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618529 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Kaiyi Li 8707811d 2020-12-01T11:50:56 Add an option to copy the artifact to vendor partition Add a --copy-to-vendor-partition optional argument to both roll_aosp.sh and generate_android_bp.py. When specified the root targets will be generated with vendor: true and a relative install path to egl folder, so that we can use ANGLE as the Android OpenGLES driver when the system starts up. Test: run roll_aosp.sh --copy-to-vendor-partion, build the Android image with m -j72, load the image with the Android emulator and find all ANGLE related *.so's are under the /vendor/lib/egl folder. Bug: angleproject:5456 Change-Id: I38c64e8ea3ad5f5d0cc0b8cd77856f49109b23c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568907 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Trevor David Black e815afbf 2020-09-07T22:09:22 First pass at increasing inclusivity Link to the inclusivity rules https://source.android.com/setup/contribute/respectful-code Bug: b/162834212 Bug: chromium:1097198 Change-Id: Ied5a9e3879d72bff3f77ea6fcda9b82f30c32c2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396737 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Trevor Black <vantablack@google.com>
Tim Van Patten 43b951c8 2020-07-21T17:36:06 Remove third_party/angle/ from generate_android_bp.py Android builds are failing due to .git/HEAD being listed in the Android.bp, which generate_android_bp.py is supposed to remove. The problem is that the blacklist contains '//third_party/angle/.git/HEAD' rather than '//.git/HEAD', due to generating the GN files from chromium/src/ rather than angle/. This CL cleans this up. Bug: b/160727922 Test: Manual script execution and building in AOSP Change-Id: Ia1682605097791d20b28686f3043ddc08d49ca52 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2310960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 20eb9be5 2020-07-07T16:24:55 Generate Android.bp from multiple gn descriptions With the introduction of ABI-specific build targets (zlib), the script generate_android_bp.py needs to be updated to consume ABI-specific gn descriptions and generate ABI-specific build rules for each target. The roll_aosp.sh script was updated to generate ABI-specific gn descriptions for each: arm arm64 x86 x64 Bug: b/160727922 Test: Manual script execution and building in AOSP Change-Id: I459b388176f8fcc010f9f5668535d941b931cdd4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2285272 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0652d0d6 2020-05-27T12:59:20 Fix non-existent required dependency TARGET module ANGLE has non-existent required: privapp_whitelist_com.android.angle Bug: b/7456955 Test: TH presubmit Change-Id: I828f154d2ff8126de8383ef56216436c29677729 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2218687 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 312e65e1 2020-04-30T12:38:01 Make sure all target names are unique in the generate Android.bp generate_android_bp.py prepends "angle_" to target names to avoid conflicts with other Android projects. This can sometimes generate conflicts when there are two targets such as "angle_vulkan_headers" and "vulkan_headers". This patch turns the gn path+target into the blueprint target name. BUG= b/155396154 Change-Id: I7a709013969ae8e312a781a2fd3c1ec530fca430 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2173833 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Tim Van Patten 868122c2 2020-04-10T13:17:44 Add 'java_api_finder' to Android.bp Per the Mainline requirement to setup coverage for APIs used by modules, we need to add the plugin 'java_api_finder' to ANGLE's Android.bp to enable the instrumentation. Bug: b:148987998 Test: Generate Android.bp, verify GoogleANGLE can build in goog/master Change-Id: Id3d82f18ecb9ff6a57cda4a60f14cd2464dff234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2145236 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Geoff Lang cb6470f9 2020-04-01T09:44:35 Set sdk_version for cc_genrules used by modules with sdk_version set sdk_version now creates a new variant, so the cc_genrules also need sdk_version set. Bug: b:149591340 Change-Id: I8c58cca2d4e73e9f123f968d47361e878743e1b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2131251 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 95a4ded5 2020-03-20T14:36:48 Android.bp: Ignore unknown warning flags. Clang and Chrome build with different versions of clang which support different warning flags. Ignore unknown warning flags when building in Android. Bug: b:142320172 Change-Id: I35eb424aa5a146fec7dabf9f3aa71bd6dd9d8f50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112282 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6ab0dbdf 2020-03-12T13:51:07 Rename ANGLE_defaults to ANGLE_java_defaults. This target already exists in internal master, avoid the name conflict until there is only one set of build files. BUG=b:142320172 Change-Id: Ida176f39422c1c57cc2936a06e61b7e86bf2cc90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2101367 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 14aaa1eb 2020-03-11T17:40:35 Refactor ANGLE target to allow GoogleANGLE to override it. GoogleANGLE will be signed in a different part of Android so it needs to be able to reference ANGLE's target and defaults to override certain properties. Update the manifests to request the needed permissions to use the developer options. Bug: b:142320172 Change-Id: Ia47815ab53f8de66332412efa2cc0fca3175e2cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2096815 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9e5bbb38 2020-03-06T16:15:11 Use ANGLE's vulkan-headers dep when rolling ANGLE into Android. We previously used the existing Android target for vulkan headers but it does not roll as fast as ANGLE's, possibly causing divergence in test results. BUG=angleproject:2344 BUG=b:150892231 Change-Id: Ibef33b266943c040219529f64ea8cd29c8c9bf83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090394 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 71903912 2020-03-06T16:12:17 Generate arch-specific defines in Android.bp ANGLE has a ANGLE_IS_32/64_BIT_CPU define that is based on the gn arg for "target_cpu". Don't emit this define as is from the gn desc, move it to an architecture-specific section of the generated blueprint. BUG=angleproject:2344 Change-Id: Ib6387d5f31b30900b5d3195da6d9b21c48e1e2a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090393 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang deb65a6f 2020-02-27T15:58:17 Add scripts for rolling and generating Android.bp for AOSP BUG=angleproject:2344 Change-Id: I379cc924a6126e22b16e4cb096026d881e06763d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2079195 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>