Merge "Revert "Don't ignore R8 warnings for optimized targets"" am: a9728cfa39

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2429092

Change-Id: I814294fdb40ebfd2bfa0b697b7c37b7a94deea7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ajinkya Chalke
2023-02-09 14:43:42 +00:00
committed by Automerger Merge Worker

View File

@@ -42,8 +42,7 @@ type DexProperties struct {
// True if the module containing this has it set by default.
EnabledByDefault bool `blueprint:"mutated"`
// Whether to continue building even if warnings are emitted. Defaults to true unless bytecode
// optimizations are enabled, in which case warnings are not ignored for safety.
// Whether to continue building even if warnings are emitted. Defaults to true.
Ignore_warnings *bool
// If true, runs R8 in Proguard compatibility mode (default).
@@ -333,9 +332,8 @@ func (d *dexer) r8Flags(ctx android.ModuleContext, flags javaBuilderFlags) (r8Fl
}
// TODO(b/180878971): missing classes should be added to the relevant builds.
// TODO(b/229727645): do not use true as default for unoptimized platform targets.
ignoreWarningsDefault := !Bool(opt.Optimize)
if proptools.BoolDefault(opt.Ignore_warnings, ignoreWarningsDefault) {
// TODO(b/229727645): do not use true as default for Android platform builds.
if proptools.BoolDefault(opt.Ignore_warnings, true) {
r8Flags = append(r8Flags, "-ignorewarnings")
}