Add l8 as a compiler to compiledump.py

Change-Id: I302d05b1b32fe9aac5174013cdc79b2f3535c0d0
diff --git a/tools/compiledump.py b/tools/compiledump.py
index 1e336c1..15b4f85 100755
--- a/tools/compiledump.py
+++ b/tools/compiledump.py
@@ -204,7 +204,7 @@
   return args.version
 
 def determine_compiler(args, dump):
-  compilers = ['d8', 'r8', 'r8full']
+  compilers = ['d8', 'r8', 'r8full', 'l8']
   if args.compiler not in compilers:
     error("Unable to determine a compiler to use. Specified %s,"
           " Valid options: %s" % (args.compiler, ', '.join(compilers)))
@@ -301,6 +301,8 @@
     cmd.extend(['-cp', '%s:%s' % (wrapper_dir, jar)])
     if compiler == 'd8':
       cmd.append('com.android.tools.r8.D8')
+    if compiler == 'l8':
+      cmd.append('com.android.tools.r8.L8')
     if compiler.startswith('r8'):
       cmd.append('com.android.tools.r8.utils.CompileDumpCompatR8')
     if compiler == 'r8':
@@ -313,7 +315,7 @@
                  determine_feature_output(feature_jar, temp)])
     if dump.library_jar():
       cmd.extend(['--lib', dump.library_jar()])
-    if dump.classpath_jar():
+    if dump.classpath_jar() and compiler != 'l8':
       cmd.extend(['--classpath', dump.classpath_jar()])
     if dump.desugared_library_json() and not args.disable_desugared_lib:
       cmd.extend(['--desugared-lib', dump.desugared_library_json()])
@@ -323,7 +325,10 @@
       cmd.extend(['--pg-conf', dump.config_file()])
     if dump.main_dex_rules_resource():
       cmd.extend(['--main-dex-rules', dump.main_dex_rules_resource()])
-    if compiler != 'd8':
+    if compiler == 'l8':
+      if dump.config_file():
+        cmd.extend(['--pg-map-output', '%s.map' % out])
+    elif compiler != 'd8':
       cmd.extend(['--pg-map-output', '%s.map' % out])
     if min_api:
       cmd.extend(['--min-api', min_api])