Add --file-per-class-file flag to D8
This is much more useful than --file-per-class when implementing
incremental dexing.
Change-Id: I751b93492a4931ea0e75e843d0de15235c4fb04c
diff --git a/src/main/java/com/android/tools/r8/D8CommandParser.java b/src/main/java/com/android/tools/r8/D8CommandParser.java
index 3c7fdd2..ac56a10 100644
--- a/src/main/java/com/android/tools/r8/D8CommandParser.java
+++ b/src/main/java/com/android/tools/r8/D8CommandParser.java
@@ -130,7 +130,10 @@
+ ".",
" --intermediate # Compile an intermediate result intended for later",
" # merging.",
- " --file-per-class # Produce a separate dex file per input class",
+ " --file-per-class # Produce a separate dex file per class.",
+ " # Synthetic classes are in their own file.",
+ " --file-per-class-file # Produce a separate dex file per input .class file.",
+ " # Synthetic classes are with their originating class.",
" --no-desugaring # Force disable desugaring.",
" --desugared-lib <file> # Specify desugared library configuration.",
" # <file> is a desugared library configuration (json).",
@@ -210,6 +213,8 @@
compilationMode = CompilationMode.RELEASE;
} else if (arg.equals("--file-per-class")) {
outputMode = OutputMode.DexFilePerClass;
+ } else if (arg.equals("--file-per-class-file")) {
+ outputMode = OutputMode.DexFilePerClassFile;
} else if (arg.equals("--classfile")) {
outputMode = OutputMode.ClassFile;
} else if (arg.equals("--output")) {