Use the "swiss army knife" jar for all tools except r8lib-de and r8lib-r8
The toolhelper.py support other tools than 'r8', 'd8', 'r8lib-d8' and
'r8lib-r8', e.g. 'disasm'.
Change-Id: I8fe7c4329e24eb0459ab0bc249569d5dda0476cb
diff --git a/tools/toolhelper.py b/tools/toolhelper.py
index d9c96f1..532af6d 100644
--- a/tools/toolhelper.py
+++ b/tools/toolhelper.py
@@ -24,13 +24,12 @@
cmd.append('-ea')
if profile:
cmd.append('-agentlib:hprof=cpu=samples,interval=1,depth=8')
- if tool in ['r8', 'd8']:
- cmd.extend(['-jar', utils.R8_JAR, tool])
+ if tool == 'r8lib-d8':
+ cmd.extend(['-cp', utils.R8LIB_JAR, 'com.android.tools.r8.D8'])
elif tool == 'r8lib-r8':
cmd.extend(['-cp', utils.R8LIB_JAR, 'com.android.tools.r8.R8'])
else:
- assert(tool == 'r8lib-d8')
- cmd.extend(['-cp', utils.R8LIB_JAR, 'com.android.tools.r8.D8'])
+ cmd.extend(['-jar', utils.R8_JAR, tool])
lib, args = extract_lib_from_args(args)
if lib:
cmd.extend(["--lib", lib])