gn2bp: properly apply -fexceptions

Test: //components/cronet/android:cronet
Change-Id: I0704cd08308bd4ae4428d53c7cf14c3d920e2ec2
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index cdee102..22d69be 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -128,13 +128,6 @@
             "libssl",
         }),
     ],
-    'cronet_aml_components_cronet_android_cronet': [
-        ('cppflags', {
-            # TODO: figure out if there is no way around this and if this is
-            # allowed for platform code.
-            "-fexceptions",
-        })
-    ],
 }
 
 
@@ -1140,6 +1133,9 @@
         local_include_dirs_set.add(flag[len('-isystem../../'):])
       if '-frtti' in flag:
         module.rtti = True
+      if '-fexceptions' in flag:
+        module.cppflags.add('-fexceptions')
+
 
     # Adding local_include_dirs is necessary due to source_sets / filegroups
     # which do not properly propagate include directories.