Commit 4f9191ea authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Fixing multidex on L+ with R8

Previously, R8 would fail if it went over the dex limit on an L+ target (like
Monochrome). However, since R8 reduced the methods pretty dramatically, it
wasn't being seen.

Bug: 908988
Change-Id: Ic393d217f8f5f493db505136e3f4c0374d98c44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594203
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Auto-Submit: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658236}
parent 5bc387fe
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Proguard flags to pass to R8 which do nothing, and thus allows R8 to
# arbitrarily assign code to different dex files. If we pass a flags file with
# no rules, R8 applies default main dex rules which usually include too much
# and pushes us over the main dex limit. We can't pass higher --min-api since we
# also want to allow multidex in libraries, which are compiled with a low
# min-api. Thus, we have rules which won't do anything to pass as a
# main-dex-rule.
-keep class this.should.not.match.anything {
*;
}
......@@ -1300,9 +1300,11 @@ if (enable_java_templates) {
]
inputs += [ _main_dex_rules ]
} else {
if (defined(invoker.extra_main_dex_proguard_config)) {
not_needed(invoker, [ "extra_main_dex_proguard_config" ])
}
args += [
"--main-dex-rules-path",
rebase_path("//build/android/arbitrary_main_dex.flags",
root_build_dir),
]
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment