Allow blocklisting cfgs.

Test: Use it for a crate.
Change-Id: I72e383ce58f64c7e545db3049376feea8ac006d1
diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py
index c567b68..64af845 100755
--- a/scripts/cargo2android.py
+++ b/scripts/cargo2android.py
@@ -676,7 +676,8 @@
     if self.edition:
       self.write('    edition: "' + self.edition + '",')
     self.dump_android_property_list('features', '"%s"', self.features)
-    self.dump_android_property_list('cfgs', '"%s"', self.cfgs)
+    cfgs = [cfg for cfg in self.cfgs if not cfg in self.runner.args.cfg_blocklist]
+    self.dump_android_property_list('cfgs', '"%s"', cfgs)
     self.dump_android_flags()
     if self.externs:
       self.dump_android_externs()
@@ -1617,6 +1618,11 @@
       help=('Do not emit the given tests. ' +
             'Pass the path to the test file to exclude.'))
   parser.add_argument(
+      '--cfg-blocklist',
+      nargs='*',
+      default=[],
+      help='Do not emit the given cfg.')
+  parser.add_argument(
       '--no-test-mapping',
       action='store_true',
       default=False,