summaryrefslogtreecommitdiffstats
path: root/chromium/build/android/gyp/dex.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2023-09-05 12:37:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2023-10-17 13:53:46 +0000
commit5a424f4a7b188b75da63eb697f63558af0b17f6f (patch)
tree54c427fcbc567dac8181ab5fd22d20e72cc51609 /chromium/build/android/gyp/dex.py
parentacbcf08a6dffdfe90a6eaf661fcd6923f0de2447 (diff)
BASELINE: Update Chromium to 116.0.5845.183
Change-Id: Iaaf57e02c218c93993a5044c659b63674e2c8a12 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/512320 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/build/android/gyp/dex.py')
-rwxr-xr-xchromium/build/android/gyp/dex.py60
1 files changed, 18 insertions, 42 deletions
diff --git a/chromium/build/android/gyp/dex.py b/chromium/build/android/gyp/dex.py
index a7f024a277d..ce91b38b1ae 100755
--- a/chromium/build/android/gyp/dex.py
+++ b/chromium/build/android/gyp/dex.py
@@ -23,42 +23,15 @@ import zip_helpers
_DEX_XMX = '2G' # Increase this when __final_dex OOMs.
-_IGNORE_WARNINGS = (
+DEFAULT_IGNORE_WARNINGS = (
# Warning: Running R8 version main (build engineering), which cannot be
# represented as a semantic version. Using an artificial version newer than
# any known version for selecting Proguard configurations embedded under
# META-INF/. This means that all rules with a '-upto-' qualifier will be
# excluded and all rules with a -from- qualifier will be included.
- r'Running R8 version main',
- # E.g. Triggers for weblayer_instrumentation_test_apk since both it and its
- # apk_under_test have no shared_libraries.
- # https://crbug.com/1364192 << To fix this in a better way.
- r'Missing class org.chromium.build.NativeLibraries',
- # Caused by internal protobuf package: https://crbug.com/1183971
- r'referenced from: com.google.protobuf.GeneratedMessageLite$GeneratedExtension', # pylint: disable=line-too-long
- # Desugaring configs may occasionally not match types in our program. This
- # may happen temporarily until we move over to the new desugared library
- # json flags. See crbug.com/1302088 - this should be removed when this bug
- # is fixed.
- r'Warning: Specification conversion: The following',
- # Caused by protobuf runtime using -identifiernamestring in a way that
- # doesn't work with R8. Looks like:
- # Rule matches the static final field `...`, which may have been inlined...
- # com.google.protobuf.*GeneratedExtensionRegistryLite {
- # static java.lang.String CONTAINING_TYPE_*;
- # }
- r'GeneratedExtensionRegistryLite.CONTAINING_TYPE_',
- # Relevant for R8 when optimizing an app that doesn't use protobuf.
- r'Ignoring -shrinkunusedprotofields since the protobuf-lite runtime is',
- # Ignore Unused Rule Warnings in third_party libraries.
- r'/third_party/.*Proguard configuration rule does not match anything',
- # Ignore Unused Rule Warnings for system classes (aapt2 generates these).
- r'Proguard configuration rule does not match anything:.*class android\.',
- # TODO(crbug.com/1303951): Don't ignore all such warnings.
- r'Proguard configuration rule does not match anything:',
- # TODO(agrieve): Remove once we update to U SDK.
- r'OnBackAnimationCallback',
-)
+ r'Running R8 version main', )
+
+INTERFACE_DESUGARING_WARNINGS = (r'default or static interface methods', )
_SKIPPED_CLASS_FILE_NAMES = (
'module-info.class', # Explicitly skipped by r8/utils/FileUtils#isClassFile
@@ -162,23 +135,20 @@ def _ParseArgs(args):
return options
-def CreateStderrFilter(show_desugar_default_interface_warnings):
+def CreateStderrFilter(filters):
def filter_stderr(output):
# Set this when debugging R8 output.
if os.environ.get('R8_SHOW_ALL_OUTPUT', '0') != '0':
return output
- warnings = re.split(r'^(?=Warning|Error)', output, flags=re.MULTILINE)
+ # All missing definitions are logged as a single warning, but start on a
+ # new line like "Missing class ...".
+ warnings = re.split(r'^(?=Warning|Error|Missing (?:class|field|method))',
+ output,
+ flags=re.MULTILINE)
preamble, *warnings = warnings
- patterns = list(_IGNORE_WARNINGS)
-
- # Missing deps can happen for prebuilts that are missing transitive deps
- # and have set enable_bytecode_checks=false.
- if not show_desugar_default_interface_warnings:
- patterns += ['default or static interface methods']
-
- combined_pattern = '|'.join(re.escape(p) for p in patterns)
+ combined_pattern = '|'.join(filters)
preamble = build_utils.FilterLines(preamble, combined_pattern)
compiled_re = re.compile(combined_pattern, re.DOTALL)
@@ -193,7 +163,13 @@ def _RunD8(dex_cmd, input_paths, output_path, warnings_as_errors,
show_desugar_default_interface_warnings):
dex_cmd = dex_cmd + ['--output', output_path] + input_paths
- stderr_filter = CreateStderrFilter(show_desugar_default_interface_warnings)
+ # Missing deps can happen for prebuilts that are missing transitive deps
+ # and have set enable_bytecode_checks=false.
+ filters = list(DEFAULT_IGNORE_WARNINGS)
+ if not show_desugar_default_interface_warnings:
+ filters += INTERFACE_DESUGARING_WARNINGS
+
+ stderr_filter = CreateStderrFilter(filters)
is_debug = logging.getLogger().isEnabledFor(logging.DEBUG)