Update compilerdump doc with info for platform
Bug: 369931283
Change-Id: Iedc726cbf401038ccb5490b4861854d801f1603f
diff --git a/doc/compilerdump.md b/doc/compilerdump.md
index c85a9ff..87976be 100644
--- a/doc/compilerdump.md
+++ b/doc/compilerdump.md
@@ -63,6 +63,17 @@
./gradlew assembleDebug -Dorg.gradle.caching=false -Dcom.android.tools.r8.dumpinputtodirectory=mydumps/ --no-daemon
```
+### Generating a dump in AOSP
+For R8 compilations you can generate dumps with the R8_DUMP_DIRECTORY environment variable.
+This will put dumps for all R8 compilations leading up to the target that you are building.
+For a specific target you can do:
+
+```
+mkdir /tmp/dumps
+R8_DUMP_DIRECTORY=/tmp/dumps m -j77 SystemUI
+```
+The actual dump file for SystemUI will be the last dump in /tmp/dumps.
+
## Reproducing using a dump
@@ -81,3 +92,4 @@
The flags can also be used to override the setting specified in the dump.
Doing so allows compiling with other compiler versions, or other settings.
+