summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ajinkya Chalke <achalke@google.com> 2023-02-09 14:09:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-02-09 14:09:58 +0000
commitddad41b912fa5e6754e895705f403ca5c578753b (patch)
treed32c60bf82eb2879ba490ed61c38a0dec4a8057b
parent5c2a1f3bda94df38e3f13e20bdbf080c0472ed2a (diff)
Revert "Don't ignore R8 warnings for optimized targets"
This reverts commit 5c2a1f3bda94df38e3f13e20bdbf080c0472ed2a. Reason for revert: This change is causing the build to break, see http://b/268404998 Change-Id: I9173d1aa42846831123273ef7651940f2b0d6608
-rw-r--r--java/dex.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/java/dex.go b/java/dex.go
index 6b7a7f05b..b6fe10982 100644
--- a/java/dex.go
+++ b/java/dex.go
@@ -43,8 +43,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).
@@ -340,9 +339,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")
}