Add --disable-assertions flag to d8.py and r8.py

Change-Id: I19526eb07c00f1a8f537cfeadee432084e92da3f
diff --git a/tools/d8.py b/tools/d8.py
index 636b7e7..cb6349d 100755
--- a/tools/d8.py
+++ b/tools/d8.py
@@ -17,6 +17,11 @@
                       '--commit_hash',
                       help='Commit hash of D8 to use.',
                       default=None)
+    parser.add_option('--disable-assertions',
+                      '--disable_assertions',
+                      help='Disable assertions when running',
+                      default=False,
+                      action='store_true')
     parser.add_option('--print-runtimeraw',
                       '--print_runtimeraw',
                       metavar='BENCHMARKNAME',
@@ -40,6 +45,7 @@
     return toolhelper.run('d8',
                           d8_args,
                           build=not options.no_build,
+                          debug=not options.disable_assertions,
                           jar=utils.find_r8_jar_from_options(options),
                           main='com.android.tools.r8.D8',
                           time_consumer=time_consumer)
diff --git a/tools/r8.py b/tools/r8.py
index 5a2f5e3..a2f54ce 100755
--- a/tools/r8.py
+++ b/tools/r8.py
@@ -23,12 +23,11 @@
         'Enable Java debug agent and suspend compilation (default disabled)',
         default=False,
         action='store_true')
-    parser.add_option(
-        '--ea',
-        help=
-        'Enable Java assertions when running the compiler (default disabled)',
-        default=False,
-        action='store_true')
+    parser.add_option('--disable-assertions',
+                      '--disable_assertions',
+                      help='Disable assertions when running',
+                      default=False,
+                      action='store_true')
     parser.add_option('--lib-android',
                       help='Add the android.jar for the given API level',
                       default=None,
@@ -64,7 +63,7 @@
     return toolhelper.run('r8',
                           r8_args,
                           build=not options.no_build,
-                          debug=options.ea,
+                          debug=not options.disable_assertions,
                           debug_agent=options.debug_agent,
                           jar=utils.find_r8_jar_from_options(options),
                           main='com.android.tools.r8.R8',