Skip to content

Commit

Permalink
Revert "Roll R8 3.0.37 -> 3.1.2"
Browse files Browse the repository at this point in the history
This reverts commit 8e79aa0.

Reason for revert: Suspecting build failure crbug/1207802

Original change's description:
> Roll R8 3.0.37 -> 3.1.2
>
> Bug: 1183415
>
> Change-Id: Ib5840bdf99fb9e2eaecc11f10d5ef7f4ffae0763
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2884118
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Owners-Override: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#881059}

Bug: 1183415, 1207802
Change-Id: Ie2afb76c18fcf6c6e9d09b617e63705a77a4203a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885044
Reviewed-by: Ben Mason <benmason@chromium.org>
Reviewed-by: Bindu Suvarna <bindusuvarna@google.com>
Owners-Override: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/branch-heads/4504@{#3}
Cr-Branched-From: 1f53ee9-refs/heads/master@{#881324}
  • Loading branch information
Ben Mason committed May 11, 2021
1 parent 16990bc commit 4a6ae58
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/r8',
'version': 'gXyBDv_fM87KnLcxvF5AGV5lwnm-JXIALYH8zrzdoaMC',
'version': '9JovxpDv8ZqFl60_eHo4hT-Ez0CelcMCoM9Cv5UJMz4C',
},
],
'condition': 'checkout_android',
Expand Down
2 changes: 0 additions & 2 deletions build/android/gyp/dex.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
# desugar doesn't preserve interfaces in the same way. This should be
# removed when D8 is used for desugaring.
r'Warning: Cannot emulate interface ',
# Only relevant for R8 when optimizing an app that doesn't use proto.
r'Ignoring -shrinkunusedprotofields since the protobuf-lite runtime is',
)


Expand Down
45 changes: 30 additions & 15 deletions build/android/gyp/proguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def _OptimizeWithR8(options,
# R8 OOMs with the default xmx=1G.
cmd = build_utils.JavaCmd(options.warnings_as_errors, xmx='2G') + [
'-Dcom.android.tools.r8.allowTestProguardOptions=1',
'-Dcom.android.tools.r8.verticalClassMerging=1',
'-Dcom.android.tools.r8.disableHorizontalClassMerging=1',
]
if options.disable_outlining:
Expand Down Expand Up @@ -466,32 +467,46 @@ def stderr_filter(stderr):

# TODO(agrieve): Create interface jars for these missing classes rather
# than allowlisting here.
'dalvik.system',
'libcore.io',
'sun.misc.Unsafe',
'dalvik/system',
'libcore/io',
'sun/misc/Unsafe',

# Found in: com/facebook/fbui/textlayoutbuilder/StaticLayoutHelper
('android/text/StaticLayout;<init>(Ljava/lang/CharSequence;IILandroid'
'/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/'
'TextDirectionHeuristic;FFZLandroid/text/TextUtils$TruncateAt;II)V'),

# Found in
# com/google/android/gms/cast/framework/media/internal/ResourceProvider
# Missing due to setting "strip_resources = true".
'com/google/android/gms/cast/framework/R',

# Found in com/google/android/gms/common/GoogleApiAvailability
# Missing due to setting "strip_drawables = true".
'com/google/android/gms/base/R$drawable',

# Explicictly guarded by try (NoClassDefFoundError) in Flogger's
# PlatformProvider.
'com.google.common.flogger.backend.google.GooglePlatform',
'com.google.common.flogger.backend.system.DefaultPlatform',
'com/google/common/flogger/backend/google/GooglePlatform',
'com/google/common/flogger/backend/system/DefaultPlatform',

# trichrome_webview_google_bundle contains this missing reference.
# TODO(crbug.com/1142530): Fix this missing reference properly.
'org.chromium.build.NativeLibraries',
'org/chromium/build/NativeLibraries',

# TODO(agrieve): Exclude these only when use_jacoco_coverage=true.
'java.lang.instrument.ClassFileTransformer',
'java.lang.instrument.IllegalClassFormatException',
'java.lang.instrument.Instrumentation',
'java.lang.management.ManagementFactory',
'javax.management.MBeanServer',
'javax.management.ObjectInstance',
'javax.management.ObjectName',
'javax.management.StandardMBean',
'Ljava/lang/instrument/ClassFileTransformer',
'Ljava/lang/instrument/IllegalClassFormatException',
'Ljava/lang/instrument/Instrumentation',
'Ljava/lang/management/ManagementFactory',
'Ljavax/management/MBeanServer',
'Ljavax/management/ObjectInstance',
'Ljavax/management/ObjectName',
'Ljavax/management/StandardMBean',

# Explicitly guarded by try (NoClassDefFoundError) in Firebase's
# KotlinDetector: com.google.firebase.platforminfo.KotlinDetector.
'kotlin.KotlinVersion',
'Lkotlin/KotlinVersion',
]

had_unfiltered_items = ' ' in stderr
Expand Down
2 changes: 1 addition & 1 deletion third_party/r8/README.chromium
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: R8
URL: https://r8.googlesource.com/r8
Version: 3.1.2-dev
Version: 3.0.37
License: BSD 3-Clause
License File: NOT_SHIPPED
Security Critical: no
Expand Down
4 changes: 0 additions & 4 deletions third_party/r8/backported_methods.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
android/util/SparseArray#set(ILjava/lang/Object;)V
java/lang/Boolean#compare(ZZ)I
java/lang/Boolean#hashCode(Z)I
java/lang/Boolean#logicalAnd(ZZ)Z
Expand Down Expand Up @@ -29,7 +28,6 @@ java/lang/Integer#divideUnsigned(II)I
java/lang/Integer#hashCode(I)I
java/lang/Integer#max(II)I
java/lang/Integer#min(II)I
java/lang/Integer#parseInt(Ljava/lang/CharSequence;III)I
java/lang/Integer#parseUnsignedInt(Ljava/lang/String;)I
java/lang/Integer#parseUnsignedInt(Ljava/lang/String;I)I
java/lang/Integer#remainderUnsigned(II)I
Expand All @@ -43,8 +41,6 @@ java/lang/Long#divideUnsigned(JJ)J
java/lang/Long#hashCode(J)I
java/lang/Long#max(JJ)J
java/lang/Long#min(JJ)J
java/lang/Long#parseLong(Ljava/lang/CharSequence;III)J
java/lang/Long#parseUnsignedLong(Ljava/lang/CharSequence;III)J
java/lang/Long#parseUnsignedLong(Ljava/lang/String;)J
java/lang/Long#parseUnsignedLong(Ljava/lang/String;I)J
java/lang/Long#remainderUnsigned(JJ)J
Expand Down

0 comments on commit 4a6ae58

Please sign in to comment.