From fce240c005072a3eda3f960e357571a5293ff2db Mon Sep 17 00:00:00 2001 From: Tim Van Patten Date: Fri, 29 Oct 2021 12:35:48 -0600 Subject: [PATCH] AOSP: Use '-Os' rather than '-Oz' Cuttlefish recently hit a clang compiler issue related to -Oz: b/200617543 This is fixed by either disabling optimizations for ScopedExit or using -Os. This CL will switch ANGLE to using -Os. When building CF in AOSP, the binary size is reduced with -Os vs -Oz: -Oz: 16,383,489 bytes -Os: 16,152,509 bytes Bug: b/200617543 Change-Id: Ic920b0e0e4a61453d9657101a4560f74d90d5744 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3253128 Reviewed-by: Jason Macnak Reviewed-by: Geoff Lang Commit-Queue: Tim Van Patten --- scripts/generate_android_bp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_android_bp.py b/scripts/generate_android_bp.py index 2d27ea263..d6e2bd5e8 100644 --- a/scripts/generate_android_bp.py +++ b/scripts/generate_android_bp.py @@ -290,7 +290,7 @@ def gn_cflags_to_blueprint_cflags(target_info): result.append('-Wno-unknown-warning-option') # Override AOSP build flags to match ANGLE's CQ testing and reduce binary size - result.append('-Oz') + result.append('-Os') result.append('-fno-unwind-tables') if 'defines' in target_info: