summaryrefslogtreecommitdiff
path: root/chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch')
-rw-r--r--chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch64
1 files changed, 0 insertions, 64 deletions
diff --git a/chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch b/chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch
deleted file mode 100644
index 7be293752d0..00000000000
--- a/chromium/third_party/r8/patches/0002-Adds-feature-jar-to-R8-command.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 78acee122ca6d379c917ed339c54f8909c7953bf Mon Sep 17 00:00:00 2001
-From: Andrew Grieve <agrieve@chromium.org>
-Date: Mon, 27 Apr 2020 15:00:00 -0400
-Subject: [PATCH 2/6] Adds --feature-jar to R8 command
-
-Chrome needs this to expose feature splits via command-line
----
- src/main/java/com/android/tools/r8/R8Command.java | 12 ++++++++++++
- .../java/com/android/tools/r8/R8CommandParser.java | 9 +++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/src/main/java/com/android/tools/r8/R8Command.java b/src/main/java/com/android/tools/r8/R8Command.java
-index 656f3aa47..909b7bc93 100644
---- a/src/main/java/com/android/tools/r8/R8Command.java
-+++ b/src/main/java/com/android/tools/r8/R8Command.java
-@@ -70,6 +70,18 @@ public final class R8Command extends BaseCompilerCommand {
- */
- @Keep
- public static class Builder extends BaseCompilerCommand.Builder<R8Command, Builder> {
-+ public Builder addFeatureJar(Path[] inputJarPaths, Path outputPath) {
-+ addFeatureSplit(builder -> {
-+ builder.setProgramConsumer(FileUtils.isArchive(outputPath)
-+ ? new DexIndexedConsumer.ArchiveConsumer(outputPath)
-+ : new DexIndexedConsumer.DirectoryConsumer(outputPath));
-+ for (Path p : inputJarPaths) {
-+ builder.addProgramResourceProvider(ArchiveProgramResourceProvider.fromArchive(p));
-+ }
-+ return builder.build();
-+ });
-+ return self();
-+ }
-
- private static class DefaultR8DiagnosticsHandler implements DiagnosticsHandler {
-
-diff --git a/src/main/java/com/android/tools/r8/R8CommandParser.java b/src/main/java/com/android/tools/r8/R8CommandParser.java
-index d31606dea..8d286601c 100644
---- a/src/main/java/com/android/tools/r8/R8CommandParser.java
-+++ b/src/main/java/com/android/tools/r8/R8CommandParser.java
-@@ -24,6 +24,7 @@ public class R8CommandParser extends BaseCompilerCommandParser<R8Command, R8Comm
- MIN_API_FLAG,
- "--main-dex-rules",
- "--main-dex-list",
-+ "--feature-jar",
- "--main-dex-list-output",
- "--pg-conf",
- "--pg-map-output",
-@@ -214,6 +215,14 @@ public class R8CommandParser extends BaseCompilerCommandParser<R8Command, R8Comm
- builder.setDisableDesugaring(true);
- } else if (arg.equals("--main-dex-rules")) {
- builder.addMainDexRulesFiles(Paths.get(nextArg));
-+ } else if (arg.equals("--feature-jar")) {
-+ String[] argParts = nextArg.split(":");
-+ Path outputPath = Paths.get(argParts[0]);
-+ Path[] inputPaths = new Path[argParts.length - 1];
-+ for (int j = 1; j < argParts.length; ++j) {
-+ inputPaths[j - 1] = Paths.get(argParts[j]);
-+ }
-+ builder.addFeatureJar(inputPaths, outputPath);
- } else if (arg.equals("--main-dex-list")) {
- builder.addMainDexListFiles(Paths.get(nextArg));
- } else if (arg.equals("--main-dex-list-output")) {
---
-2.26.2.761.g0e0b3e54be-goog
-