gn2bp: support architecture in builtin_deps

Test: none
Change-Id: I2c007222d8beeec3d37941eca69813f791bc67dd
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 4bf6efb..1c36c61 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -144,9 +144,9 @@
 # depends on.
 builtin_deps = {
     '//buildtools/third_party/libunwind:libunwind':
-        lambda x: None, # disable libunwind
+        lambda m, a: None, # disable libunwind
     '//net/tools/root_store_tool:root_store_tool':
-        lambda x: None,
+        lambda m, a: None,
 }
 
 # Name of tethering apex module
@@ -1216,7 +1216,7 @@
     # |builtin_deps| override GN deps with Android-specific ones. See the
     # config in the top of this file.
     if dep_name in builtin_deps:
-      builtin_deps[dep_name](module)
+      builtin_deps[dep_name](module, None)
       continue
 
     dep_module = create_modules_from_target(blueprint, gn, dep_name)
@@ -1269,6 +1269,11 @@
 
   for arch_name, arch in target.arch.items():
     for dep_name in arch.deps:
+      # |builtin_deps| override GN deps with Android-specific ones. See the
+      # config in the top of this file.
+      if dep_name in builtin_deps:
+        builtin_deps[dep_name](module, arch_name)
+        continue
       dep_module = create_modules_from_target(blueprint, gn, dep_name)
       # Arch-specific dependencies currently only include cc_library_static.
       # Revisit this approach once we need to support more target types.