Skip to content

Commit 12c0e76

Browse files
tobineCommit Bot
authored and
Commit Bot
committed
Add GN arg to extract native libs in APK
Added GN bool arg "angle_extract_native_libs." When "false," which is the default, the native libs are zipped in the ANGLE apk. When true, the libs will be extracted which is useful when capturing flame graphs in order to see the ANGLE function names in your flamegraph. Bug: angleproject:4304 Change-Id: I86c91e5028688142b1137b859c800f2243c124d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2028524 Reviewed-by: Tim Van Patten <[email protected]> Commit-Queue: Tobin Ehlis <[email protected]>
1 parent e4859ae commit 12c0e76

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

android/AndroidManifest.xml.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
package="{{manifest_package|default('com.chromium.angle')}}">
1111

1212
<application android:label="Angle for Android"
13-
android:extractNativeLibs="false"
13+
android:extractNativeLibs="{{extract_native_libs|default('false')}}"
1414
android:multiArch="true">
1515
</application>
1616
</manifest>

android/angle_apk.gni

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ if (enable_java_templates) {
2323
jinja_template(manifest_target_name) {
2424
input = "//third_party/angle/android/AndroidManifest.xml.jinja2"
2525
output = manifest_path
26-
variables = [ "manifest_package=${invoker.package_name}" ]
26+
variables = [
27+
"manifest_package=${invoker.package_name}",
28+
"extract_native_libs=${angle_extract_native_libs}",
29+
]
2730
}
2831

2932
android_assets("${invoker.package_name}_assets") {

gni/angle.gni

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import("//build_overrides/angle.gni")
66

77
declare_args() {
88
is_ggp = false
9+
10+
# Extract native libs in ANGLE apk. Useful for flamegraph generation.
11+
angle_extract_native_libs = false
912
}
1013

1114
if (angle_has_build) {

0 commit comments

Comments
 (0)