gn2bp: Convert genrules to cc_genrules

* This change doesn't effectively use the `CC_ARCH` environment variable. Just a change of variable name.
* cc_genrules are compiled so they need host_supported/device_supported tags.

Test: m cronet_aml_components_cronet_android_cronet
Change-Id: Ie55e5e0fb60b444817bc13c967e89f35c4e8badf
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 50bb9b9..886b4a9 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -15,7 +15,7 @@
 // This file is automatically generated by gen_android_bp. Do not edit.
 
 // GN: //base/allocator:buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_buildflags__android_arm",
     cmd: "echo '--flags USE_PARTITION_ALLOC=\"false\" USE_ALLOCATOR_SHIM=\"true\" USE_PARTITION_ALLOC_AS_MALLOC=\"false\" USE_BACKUP_REF_PTR=\"false\" USE_ASAN_BACKUP_REF_PTR=\"false\" USE_PARTITION_ALLOC_AS_GWP_ASAN_STORE=\"false\" USE_MTE_CHECKED_PTR=\"false\" FORCE_ENABLE_RAW_PTR_EXCLUSION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -35,7 +35,7 @@
 }
 
 // GN: //base/allocator:buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_buildflags__android_arm64",
     cmd: "echo '--flags USE_PARTITION_ALLOC=\"false\" USE_ALLOCATOR_SHIM=\"true\" USE_PARTITION_ALLOC_AS_MALLOC=\"false\" USE_BACKUP_REF_PTR=\"false\" USE_ASAN_BACKUP_REF_PTR=\"false\" USE_PARTITION_ALLOC_AS_GWP_ASAN_STORE=\"false\" USE_MTE_CHECKED_PTR=\"false\" FORCE_ENABLE_RAW_PTR_EXCLUSION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -55,7 +55,7 @@
 }
 
 // GN: //base/allocator:buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_buildflags__android_x86",
     cmd: "echo '--flags USE_PARTITION_ALLOC=\"false\" USE_ALLOCATOR_SHIM=\"true\" USE_PARTITION_ALLOC_AS_MALLOC=\"false\" USE_BACKUP_REF_PTR=\"false\" USE_ASAN_BACKUP_REF_PTR=\"false\" USE_PARTITION_ALLOC_AS_GWP_ASAN_STORE=\"false\" USE_MTE_CHECKED_PTR=\"false\" FORCE_ENABLE_RAW_PTR_EXCLUSION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -75,7 +75,7 @@
 }
 
 // GN: //base/allocator:buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_buildflags__android_x86_64",
     cmd: "echo '--flags USE_PARTITION_ALLOC=\"false\" USE_ALLOCATOR_SHIM=\"true\" USE_PARTITION_ALLOC_AS_MALLOC=\"false\" USE_BACKUP_REF_PTR=\"false\" USE_ASAN_BACKUP_REF_PTR=\"false\" USE_PARTITION_ALLOC_AS_GWP_ASAN_STORE=\"false\" USE_MTE_CHECKED_PTR=\"false\" FORCE_ENABLE_RAW_PTR_EXCLUSION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -95,7 +95,7 @@
 }
 
 // GN: //base/allocator:buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_buildflags__host",
     cmd: "echo '--flags USE_PARTITION_ALLOC=\"false\" USE_ALLOCATOR_SHIM=\"true\" USE_PARTITION_ALLOC_AS_MALLOC=\"false\" USE_BACKUP_REF_PTR=\"false\" USE_ASAN_BACKUP_REF_PTR=\"false\" USE_PARTITION_ALLOC_AS_GWP_ASAN_STORE=\"false\" USE_MTE_CHECKED_PTR=\"false\" FORCE_ENABLE_RAW_PTR_EXCLUSION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -106,6 +106,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/allocator/buildflags.h",
     ],
@@ -115,7 +117,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromecast_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_arm",
     cmd: "echo '--flags PA_IS_CAST_ANDROID=\"false\" PA_IS_CASTOS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -135,7 +137,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromecast_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_arm64",
     cmd: "echo '--flags PA_IS_CAST_ANDROID=\"false\" PA_IS_CASTOS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -155,7 +157,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromecast_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_x86",
     cmd: "echo '--flags PA_IS_CAST_ANDROID=\"false\" PA_IS_CASTOS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -175,7 +177,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromecast_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_x86_64",
     cmd: "echo '--flags PA_IS_CAST_ANDROID=\"false\" PA_IS_CASTOS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -195,7 +197,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromecast_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__host",
     cmd: "echo '--flags PA_IS_CAST_ANDROID=\"false\" PA_IS_CASTOS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -206,6 +208,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/allocator/partition_allocator/chromecast_buildflags.h",
     ],
@@ -215,7 +219,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromeos_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_arm",
     cmd: "echo '--flags PA_IS_CHROMEOS_ASH=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -235,7 +239,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromeos_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_arm64",
     cmd: "echo '--flags PA_IS_CHROMEOS_ASH=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -255,7 +259,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromeos_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_x86",
     cmd: "echo '--flags PA_IS_CHROMEOS_ASH=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -275,7 +279,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromeos_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_x86_64",
     cmd: "echo '--flags PA_IS_CHROMEOS_ASH=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -295,7 +299,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:chromeos_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__host",
     cmd: "echo '--flags PA_IS_CHROMEOS_ASH=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -306,6 +310,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/allocator/partition_allocator/chromeos_buildflags.h",
     ],
@@ -315,7 +321,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:debugging_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_arm",
     cmd: "echo '--flags PA_DCHECK_IS_ON=\"true\" PA_EXPENSIVE_DCHECKS_ARE_ON=\"true\" PA_DCHECK_IS_CONFIGURABLE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -335,7 +341,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:debugging_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_arm64",
     cmd: "echo '--flags PA_DCHECK_IS_ON=\"true\" PA_EXPENSIVE_DCHECKS_ARE_ON=\"true\" PA_DCHECK_IS_CONFIGURABLE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -355,7 +361,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:debugging_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_x86",
     cmd: "echo '--flags PA_DCHECK_IS_ON=\"true\" PA_EXPENSIVE_DCHECKS_ARE_ON=\"true\" PA_DCHECK_IS_CONFIGURABLE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -375,7 +381,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:debugging_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_x86_64",
     cmd: "echo '--flags PA_DCHECK_IS_ON=\"true\" PA_EXPENSIVE_DCHECKS_ARE_ON=\"true\" PA_DCHECK_IS_CONFIGURABLE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -395,7 +401,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:debugging_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__host",
     cmd: "echo '--flags PA_DCHECK_IS_ON=\"true\" PA_EXPENSIVE_DCHECKS_ARE_ON=\"true\" PA_DCHECK_IS_CONFIGURABLE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -406,6 +412,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/allocator/partition_allocator/partition_alloc_base/debug/debugging_buildflags.h",
     ],
@@ -415,7 +423,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:logging_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_arm",
     cmd: "echo '--flags PA_ENABLE_LOG_ERROR_NOT_REACHED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -435,7 +443,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:logging_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_arm64",
     cmd: "echo '--flags PA_ENABLE_LOG_ERROR_NOT_REACHED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -455,7 +463,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:logging_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_x86",
     cmd: "echo '--flags PA_ENABLE_LOG_ERROR_NOT_REACHED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -475,7 +483,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:logging_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_x86_64",
     cmd: "echo '--flags PA_ENABLE_LOG_ERROR_NOT_REACHED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -495,7 +503,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:logging_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_logging_buildflags__host",
     cmd: "echo '--flags PA_ENABLE_LOG_ERROR_NOT_REACHED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -506,6 +514,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/allocator/partition_allocator/logging_buildflags.h",
     ],
@@ -760,7 +770,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:partition_alloc_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -780,7 +790,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:partition_alloc_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -800,7 +810,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:partition_alloc_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -820,7 +830,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:partition_alloc_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -840,7 +850,7 @@
 }
 
 // GN: //base/allocator/partition_allocator:partition_alloc_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__host",
     cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -851,6 +861,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/allocator/partition_allocator/partition_alloc_buildflags.h",
     ],
@@ -860,7 +872,7 @@
 }
 
 // GN: //base:anchor_functions_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_anchor_functions_buildflags__android_arm",
     cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -880,7 +892,7 @@
 }
 
 // GN: //base:anchor_functions_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_anchor_functions_buildflags__android_arm64",
     cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -900,7 +912,7 @@
 }
 
 // GN: //base:anchor_functions_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_anchor_functions_buildflags__android_x86",
     cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -920,7 +932,7 @@
 }
 
 // GN: //base:anchor_functions_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_anchor_functions_buildflags__android_x86_64",
     cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -940,7 +952,7 @@
 }
 
 // GN: //base:anchor_functions_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_anchor_functions_buildflags__host",
     cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -951,6 +963,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/android/library_loader/anchor_functions_buildflags.h",
     ],
@@ -960,7 +974,7 @@
 }
 
 // GN: //base:android_runtime_jni_headers__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_android_runtime_jni_headers__android_arm",
     cmd: "$(location base/android/jni_generator/jni_generator.py) --ptr_type " +
          "long " +
@@ -997,7 +1011,7 @@
 }
 
 // GN: //base:android_runtime_jni_headers__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_android_runtime_jni_headers__android_arm64",
     cmd: "$(location base/android/jni_generator/jni_generator.py) --ptr_type " +
          "long " +
@@ -1034,7 +1048,7 @@
 }
 
 // GN: //base:android_runtime_jni_headers__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_android_runtime_jni_headers__android_x86",
     cmd: "$(location base/android/jni_generator/jni_generator.py) --ptr_type " +
          "long " +
@@ -1071,7 +1085,7 @@
 }
 
 // GN: //base:android_runtime_jni_headers__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_android_runtime_jni_headers__android_x86_64",
     cmd: "$(location base/android/jni_generator/jni_generator.py) --ptr_type " +
          "long " +
@@ -1667,11 +1681,6 @@
             ],
             generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_arm",
                 "cronet_aml_base_anchor_functions_buildflags__android_arm",
                 "cronet_aml_base_android_runtime_jni_headers__android_arm",
                 "cronet_aml_base_base_jni_headers__android_arm",
@@ -1697,11 +1706,6 @@
             ],
             export_generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_arm",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_arm",
                 "cronet_aml_base_anchor_functions_buildflags__android_arm",
                 "cronet_aml_base_android_runtime_jni_headers__android_arm",
                 "cronet_aml_base_base_jni_headers__android_arm",
@@ -1812,11 +1816,6 @@
             ],
             generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_arm64",
                 "cronet_aml_base_anchor_functions_buildflags__android_arm64",
                 "cronet_aml_base_android_runtime_jni_headers__android_arm64",
                 "cronet_aml_base_base_jni_headers__android_arm64",
@@ -1842,11 +1841,6 @@
             ],
             export_generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_arm64",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_arm64",
                 "cronet_aml_base_anchor_functions_buildflags__android_arm64",
                 "cronet_aml_base_android_runtime_jni_headers__android_arm64",
                 "cronet_aml_base_base_jni_headers__android_arm64",
@@ -1958,11 +1952,6 @@
             ],
             generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_x86",
                 "cronet_aml_base_anchor_functions_buildflags__android_x86",
                 "cronet_aml_base_android_runtime_jni_headers__android_x86",
                 "cronet_aml_base_base_jni_headers__android_x86",
@@ -1988,11 +1977,6 @@
             ],
             export_generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_x86",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_x86",
                 "cronet_aml_base_anchor_functions_buildflags__android_x86",
                 "cronet_aml_base_android_runtime_jni_headers__android_x86",
                 "cronet_aml_base_base_jni_headers__android_x86",
@@ -2104,11 +2088,6 @@
             ],
             generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_x86_64",
                 "cronet_aml_base_anchor_functions_buildflags__android_x86_64",
                 "cronet_aml_base_android_runtime_jni_headers__android_x86_64",
                 "cronet_aml_base_base_jni_headers__android_x86_64",
@@ -2134,11 +2113,6 @@
             ],
             export_generated_headers: [
                 "cronet_aml_base_allocator_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__android_x86_64",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__android_x86_64",
                 "cronet_aml_base_anchor_functions_buildflags__android_x86_64",
                 "cronet_aml_base_android_runtime_jni_headers__android_x86_64",
                 "cronet_aml_base_base_jni_headers__android_x86_64",
@@ -2199,11 +2173,6 @@
             ],
             generated_headers: [
                 "cronet_aml_base_allocator_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__host",
                 "cronet_aml_base_anchor_functions_buildflags__host",
                 "cronet_aml_base_build_date__host",
                 "cronet_aml_base_cfi_buildflags__host",
@@ -2227,11 +2196,6 @@
             ],
             export_generated_headers: [
                 "cronet_aml_base_allocator_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_debugging_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_logging_buildflags__host",
-                "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags__host",
                 "cronet_aml_base_anchor_functions_buildflags__host",
                 "cronet_aml_base_build_date__host",
                 "cronet_aml_base_cfi_buildflags__host",
@@ -2258,7 +2222,7 @@
 }
 
 // GN: //base:base_jni_headers__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_base_jni_headers__android_arm",
     srcs: [
         "base/android/java/src/org/chromium/base/ApkAssets.java",
@@ -2523,7 +2487,7 @@
 }
 
 // GN: //base:base_jni_headers__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_base_jni_headers__android_arm64",
     srcs: [
         "base/android/java/src/org/chromium/base/ApkAssets.java",
@@ -2788,7 +2752,7 @@
 }
 
 // GN: //base:base_jni_headers__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_base_jni_headers__android_x86",
     srcs: [
         "base/android/java/src/org/chromium/base/ApkAssets.java",
@@ -3053,7 +3017,7 @@
 }
 
 // GN: //base:base_jni_headers__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_base_jni_headers__android_x86_64",
     srcs: [
         "base/android/java/src/org/chromium/base/ApkAssets.java",
@@ -3425,7 +3389,7 @@
 }
 
 // GN: //base:build_date__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_build_date__android_arm",
     cmd: "$(location build/write_build_date_header.py) $(out) " +
          "1664686800",
@@ -3438,7 +3402,7 @@
 }
 
 // GN: //base:build_date__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_build_date__android_arm64",
     cmd: "$(location build/write_build_date_header.py) $(out) " +
          "1664686800",
@@ -3451,7 +3415,7 @@
 }
 
 // GN: //base:build_date__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_build_date__android_x86",
     cmd: "$(location build/write_build_date_header.py) $(out) " +
          "1664686800",
@@ -3464,7 +3428,7 @@
 }
 
 // GN: //base:build_date__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_build_date__android_x86_64",
     cmd: "$(location build/write_build_date_header.py) $(out) " +
          "1664686800",
@@ -3477,10 +3441,12 @@
 }
 
 // GN: //base:build_date__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_build_date__host",
     cmd: "$(location build/write_build_date_header.py) $(out) " +
          "1664686800",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/generated_build_date.h",
     ],
@@ -3490,7 +3456,7 @@
 }
 
 // GN: //base:cfi_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_cfi_buildflags__android_arm",
     cmd: "echo '--flags CFI_CAST_CHECK=\"false && false\" CFI_DIAG=\"false && false\" CFI_ICALL_CHECK=\"false && false\" CFI_ENFORCEMENT_TRAP=\"false && !false\" CFI_ENFORCEMENT_DIAGNOSTIC=\"false && false && !false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3510,7 +3476,7 @@
 }
 
 // GN: //base:cfi_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_cfi_buildflags__android_arm64",
     cmd: "echo '--flags CFI_CAST_CHECK=\"false && false\" CFI_DIAG=\"false && false\" CFI_ICALL_CHECK=\"false && false\" CFI_ENFORCEMENT_TRAP=\"false && !false\" CFI_ENFORCEMENT_DIAGNOSTIC=\"false && false && !false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3530,7 +3496,7 @@
 }
 
 // GN: //base:cfi_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_cfi_buildflags__android_x86",
     cmd: "echo '--flags CFI_CAST_CHECK=\"false && false\" CFI_DIAG=\"false && false\" CFI_ICALL_CHECK=\"false && false\" CFI_ENFORCEMENT_TRAP=\"false && !false\" CFI_ENFORCEMENT_DIAGNOSTIC=\"false && false && !false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3550,7 +3516,7 @@
 }
 
 // GN: //base:cfi_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_cfi_buildflags__android_x86_64",
     cmd: "echo '--flags CFI_CAST_CHECK=\"false && false\" CFI_DIAG=\"false && false\" CFI_ICALL_CHECK=\"false && false\" CFI_ENFORCEMENT_TRAP=\"false && !false\" CFI_ENFORCEMENT_DIAGNOSTIC=\"false && false && !false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3570,7 +3536,7 @@
 }
 
 // GN: //base:cfi_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_cfi_buildflags__host",
     cmd: "echo '--flags CFI_CAST_CHECK=\"false && false\" CFI_DIAG=\"false && false\" CFI_ICALL_CHECK=\"false && false\" CFI_ENFORCEMENT_TRAP=\"false && !false\" CFI_ENFORCEMENT_DIAGNOSTIC=\"false && false && !false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3581,6 +3547,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/cfi_buildflags.h",
     ],
@@ -3590,7 +3558,7 @@
 }
 
 // GN: //base:clang_profiling_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_clang_profiling_buildflags__android_arm",
     cmd: "echo '--flags CLANG_PROFILING=\"false\" CLANG_PROFILING_INSIDE_SANDBOX=\"false\" USE_CLANG_COVERAGE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3610,7 +3578,7 @@
 }
 
 // GN: //base:clang_profiling_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_clang_profiling_buildflags__android_arm64",
     cmd: "echo '--flags CLANG_PROFILING=\"false\" CLANG_PROFILING_INSIDE_SANDBOX=\"false\" USE_CLANG_COVERAGE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3630,7 +3598,7 @@
 }
 
 // GN: //base:clang_profiling_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_clang_profiling_buildflags__android_x86",
     cmd: "echo '--flags CLANG_PROFILING=\"false\" CLANG_PROFILING_INSIDE_SANDBOX=\"false\" USE_CLANG_COVERAGE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3650,7 +3618,7 @@
 }
 
 // GN: //base:clang_profiling_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_clang_profiling_buildflags__android_x86_64",
     cmd: "echo '--flags CLANG_PROFILING=\"false\" CLANG_PROFILING_INSIDE_SANDBOX=\"false\" USE_CLANG_COVERAGE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3670,7 +3638,7 @@
 }
 
 // GN: //base:clang_profiling_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_clang_profiling_buildflags__host",
     cmd: "echo '--flags CLANG_PROFILING=\"false\" CLANG_PROFILING_INSIDE_SANDBOX=\"false\" USE_CLANG_COVERAGE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3681,6 +3649,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/clang_profiling_buildflags.h",
     ],
@@ -3690,7 +3660,7 @@
 }
 
 // GN: //base:debugging_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_debugging_buildflags__android_arm",
     cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"false\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"true\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3710,7 +3680,7 @@
 }
 
 // GN: //base:debugging_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_debugging_buildflags__android_arm64",
     cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"true\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"false\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3730,7 +3700,7 @@
 }
 
 // GN: //base:debugging_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_debugging_buildflags__android_x86",
     cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"true\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"false\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3750,7 +3720,7 @@
 }
 
 // GN: //base:debugging_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_debugging_buildflags__android_x86_64",
     cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"false\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"false\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3770,7 +3740,7 @@
 }
 
 // GN: //base:debugging_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_debugging_buildflags__host",
     cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"true\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"false\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3781,6 +3751,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/debug/debugging_buildflags.h",
     ],
@@ -3790,7 +3762,7 @@
 }
 
 // GN: //base:feature_list_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_feature_list_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_BANNED_BASE_FEATURE_PREFIX=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3810,7 +3782,7 @@
 }
 
 // GN: //base:feature_list_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_feature_list_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_BANNED_BASE_FEATURE_PREFIX=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3830,7 +3802,7 @@
 }
 
 // GN: //base:feature_list_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_feature_list_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_BANNED_BASE_FEATURE_PREFIX=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3850,7 +3822,7 @@
 }
 
 // GN: //base:feature_list_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_feature_list_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_BANNED_BASE_FEATURE_PREFIX=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3870,7 +3842,7 @@
 }
 
 // GN: //base:feature_list_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_feature_list_buildflags__host",
     cmd: "echo '--flags ENABLE_BANNED_BASE_FEATURE_PREFIX=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3881,6 +3853,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/feature_list_buildflags.h",
     ],
@@ -3890,7 +3864,7 @@
 }
 
 // GN: //base:ios_cronet_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_ios_cronet_buildflags__android_arm",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3910,7 +3884,7 @@
 }
 
 // GN: //base:ios_cronet_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_ios_cronet_buildflags__android_arm64",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3930,7 +3904,7 @@
 }
 
 // GN: //base:ios_cronet_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_ios_cronet_buildflags__android_x86",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3950,7 +3924,7 @@
 }
 
 // GN: //base:ios_cronet_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_ios_cronet_buildflags__android_x86_64",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3970,7 +3944,7 @@
 }
 
 // GN: //base:ios_cronet_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_ios_cronet_buildflags__host",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -3981,6 +3955,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/message_loop/ios_cronet_buildflags.h",
     ],
@@ -3990,7 +3966,7 @@
 }
 
 // GN: //base:logging_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_logging_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_LOG_ERROR_NOT_REACHED=\"false\" USE_RUNTIME_VLOG=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4010,7 +3986,7 @@
 }
 
 // GN: //base:logging_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_logging_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_LOG_ERROR_NOT_REACHED=\"false\" USE_RUNTIME_VLOG=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4030,7 +4006,7 @@
 }
 
 // GN: //base:logging_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_logging_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_LOG_ERROR_NOT_REACHED=\"false\" USE_RUNTIME_VLOG=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4050,7 +4026,7 @@
 }
 
 // GN: //base:logging_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_logging_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_LOG_ERROR_NOT_REACHED=\"false\" USE_RUNTIME_VLOG=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4070,7 +4046,7 @@
 }
 
 // GN: //base:logging_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_logging_buildflags__host",
     cmd: "echo '--flags ENABLE_LOG_ERROR_NOT_REACHED=\"false\" USE_RUNTIME_VLOG=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4081,6 +4057,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/logging_buildflags.h",
     ],
@@ -4090,7 +4068,7 @@
 }
 
 // GN: //base:message_pump_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_message_pump_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_MESSAGE_PUMP_EPOLL=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4110,7 +4088,7 @@
 }
 
 // GN: //base:message_pump_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_message_pump_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_MESSAGE_PUMP_EPOLL=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4130,7 +4108,7 @@
 }
 
 // GN: //base:message_pump_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_message_pump_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_MESSAGE_PUMP_EPOLL=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4150,7 +4128,7 @@
 }
 
 // GN: //base:message_pump_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_message_pump_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_MESSAGE_PUMP_EPOLL=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4170,7 +4148,7 @@
 }
 
 // GN: //base:message_pump_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_message_pump_buildflags__host",
     cmd: "echo '--flags ENABLE_MESSAGE_PUMP_EPOLL=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4181,6 +4159,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/message_loop/message_pump_buildflags.h",
     ],
@@ -4264,7 +4244,7 @@
 }
 
 // GN: //base:orderfile_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_orderfile_buildflags__android_arm",
     cmd: "echo '--flags DEVTOOLS_INSTRUMENTATION_DUMPING=\"false\" ORDERFILE_INSTRUMENTATION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4284,7 +4264,7 @@
 }
 
 // GN: //base:orderfile_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_orderfile_buildflags__android_arm64",
     cmd: "echo '--flags DEVTOOLS_INSTRUMENTATION_DUMPING=\"false\" ORDERFILE_INSTRUMENTATION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4304,7 +4284,7 @@
 }
 
 // GN: //base:orderfile_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_orderfile_buildflags__android_x86",
     cmd: "echo '--flags DEVTOOLS_INSTRUMENTATION_DUMPING=\"false\" ORDERFILE_INSTRUMENTATION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4324,7 +4304,7 @@
 }
 
 // GN: //base:orderfile_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_orderfile_buildflags__android_x86_64",
     cmd: "echo '--flags DEVTOOLS_INSTRUMENTATION_DUMPING=\"false\" ORDERFILE_INSTRUMENTATION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4344,7 +4324,7 @@
 }
 
 // GN: //base:orderfile_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_orderfile_buildflags__host",
     cmd: "echo '--flags DEVTOOLS_INSTRUMENTATION_DUMPING=\"false\" ORDERFILE_INSTRUMENTATION=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4355,6 +4335,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/android/orderfile/orderfile_buildflags.h",
     ],
@@ -4364,7 +4346,7 @@
 }
 
 // GN: //base:parsing_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_parsing_buildflags__android_arm",
     cmd: "echo '--flags BUILD_RUST_JSON_PARSER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4384,7 +4366,7 @@
 }
 
 // GN: //base:parsing_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_parsing_buildflags__android_arm64",
     cmd: "echo '--flags BUILD_RUST_JSON_PARSER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4404,7 +4386,7 @@
 }
 
 // GN: //base:parsing_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_parsing_buildflags__android_x86",
     cmd: "echo '--flags BUILD_RUST_JSON_PARSER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4424,7 +4406,7 @@
 }
 
 // GN: //base:parsing_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_parsing_buildflags__android_x86_64",
     cmd: "echo '--flags BUILD_RUST_JSON_PARSER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4444,7 +4426,7 @@
 }
 
 // GN: //base:parsing_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_parsing_buildflags__host",
     cmd: "echo '--flags BUILD_RUST_JSON_PARSER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4455,6 +4437,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/parsing_buildflags.h",
     ],
@@ -4464,7 +4448,7 @@
 }
 
 // GN: //base:power_monitor_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_power_monitor_buildflags__android_arm",
     cmd: "echo '--flags HAS_BATTERY_LEVEL_PROVIDER_IMPL=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4484,7 +4468,7 @@
 }
 
 // GN: //base:power_monitor_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_power_monitor_buildflags__android_arm64",
     cmd: "echo '--flags HAS_BATTERY_LEVEL_PROVIDER_IMPL=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4504,7 +4488,7 @@
 }
 
 // GN: //base:power_monitor_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_power_monitor_buildflags__android_x86",
     cmd: "echo '--flags HAS_BATTERY_LEVEL_PROVIDER_IMPL=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4524,7 +4508,7 @@
 }
 
 // GN: //base:power_monitor_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_power_monitor_buildflags__android_x86_64",
     cmd: "echo '--flags HAS_BATTERY_LEVEL_PROVIDER_IMPL=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4544,7 +4528,7 @@
 }
 
 // GN: //base:power_monitor_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_power_monitor_buildflags__host",
     cmd: "echo '--flags HAS_BATTERY_LEVEL_PROVIDER_IMPL=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4555,6 +4539,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/power_monitor/power_monitor_buildflags.h",
     ],
@@ -4564,7 +4550,7 @@
 }
 
 // GN: //base:profiler_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_profiler_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_ARM_CFI_TABLE=\"true\" IOS_STACK_PROFILER_ENABLED=\"true\" USE_ANDROID_UNWINDER_V2=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4584,7 +4570,7 @@
 }
 
 // GN: //base:profiler_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_profiler_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_ARM_CFI_TABLE=\"false\" IOS_STACK_PROFILER_ENABLED=\"true\" USE_ANDROID_UNWINDER_V2=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4604,7 +4590,7 @@
 }
 
 // GN: //base:profiler_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_profiler_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_ARM_CFI_TABLE=\"false\" IOS_STACK_PROFILER_ENABLED=\"true\" USE_ANDROID_UNWINDER_V2=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4624,7 +4610,7 @@
 }
 
 // GN: //base:profiler_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_profiler_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_ARM_CFI_TABLE=\"false\" IOS_STACK_PROFILER_ENABLED=\"true\" USE_ANDROID_UNWINDER_V2=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4644,7 +4630,7 @@
 }
 
 // GN: //base:profiler_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_profiler_buildflags__host",
     cmd: "echo '--flags ENABLE_ARM_CFI_TABLE=\"false\" IOS_STACK_PROFILER_ENABLED=\"true\" USE_ANDROID_UNWINDER_V2=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4655,6 +4641,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/profiler/profiler_buildflags.h",
     ],
@@ -4664,7 +4652,7 @@
 }
 
 // GN: //base:sanitizer_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_sanitizer_buildflags__android_arm",
     cmd: "echo '--flags IS_HWASAN=\"false\" USING_SANITIZER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4684,7 +4672,7 @@
 }
 
 // GN: //base:sanitizer_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_sanitizer_buildflags__android_arm64",
     cmd: "echo '--flags IS_HWASAN=\"false\" USING_SANITIZER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4704,7 +4692,7 @@
 }
 
 // GN: //base:sanitizer_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_sanitizer_buildflags__android_x86",
     cmd: "echo '--flags IS_HWASAN=\"false\" USING_SANITIZER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4724,7 +4712,7 @@
 }
 
 // GN: //base:sanitizer_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_sanitizer_buildflags__android_x86_64",
     cmd: "echo '--flags IS_HWASAN=\"false\" USING_SANITIZER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4744,7 +4732,7 @@
 }
 
 // GN: //base:sanitizer_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_sanitizer_buildflags__host",
     cmd: "echo '--flags IS_HWASAN=\"false\" USING_SANITIZER=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4755,6 +4743,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/sanitizer_buildflags.h",
     ],
@@ -4764,7 +4754,7 @@
 }
 
 // GN: //base:synchronization_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_synchronization_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_MUTEX_PRIORITY_INHERITANCE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4784,7 +4774,7 @@
 }
 
 // GN: //base:synchronization_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_synchronization_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_MUTEX_PRIORITY_INHERITANCE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4804,7 +4794,7 @@
 }
 
 // GN: //base:synchronization_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_synchronization_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_MUTEX_PRIORITY_INHERITANCE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4824,7 +4814,7 @@
 }
 
 // GN: //base:synchronization_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_synchronization_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_MUTEX_PRIORITY_INHERITANCE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4844,7 +4834,7 @@
 }
 
 // GN: //base:synchronization_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_synchronization_buildflags__host",
     cmd: "echo '--flags ENABLE_MUTEX_PRIORITY_INHERITANCE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -4855,6 +4845,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/synchronization/synchronization_buildflags.h",
     ],
@@ -5154,7 +5146,7 @@
 }
 
 // GN: //base:tracing_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_base_tracing_buildflags__android_arm",
     cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5174,7 +5166,7 @@
 }
 
 // GN: //base:tracing_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_tracing_buildflags__android_arm64",
     cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5194,7 +5186,7 @@
 }
 
 // GN: //base:tracing_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_base_tracing_buildflags__android_x86",
     cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5214,7 +5206,7 @@
 }
 
 // GN: //base:tracing_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_base_tracing_buildflags__android_x86_64",
     cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5234,7 +5226,7 @@
 }
 
 // GN: //base:tracing_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_base_tracing_buildflags__host",
     cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5245,6 +5237,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "base/tracing_buildflags.h",
     ],
@@ -5254,7 +5248,7 @@
 }
 
 // GN: //build:branding_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_build_branding_buildflags__android_arm",
     cmd: "echo '--flags CHROMIUM_BRANDING=\"1\" GOOGLE_CHROME_BRANDING=\"0\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5274,7 +5268,7 @@
 }
 
 // GN: //build:branding_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_branding_buildflags__android_arm64",
     cmd: "echo '--flags CHROMIUM_BRANDING=\"1\" GOOGLE_CHROME_BRANDING=\"0\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5294,7 +5288,7 @@
 }
 
 // GN: //build:branding_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_build_branding_buildflags__android_x86",
     cmd: "echo '--flags CHROMIUM_BRANDING=\"1\" GOOGLE_CHROME_BRANDING=\"0\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5314,7 +5308,7 @@
 }
 
 // GN: //build:branding_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_branding_buildflags__android_x86_64",
     cmd: "echo '--flags CHROMIUM_BRANDING=\"1\" GOOGLE_CHROME_BRANDING=\"0\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5334,7 +5328,7 @@
 }
 
 // GN: //build:branding_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_build_branding_buildflags__host",
     cmd: "echo '--flags CHROMIUM_BRANDING=\"1\" GOOGLE_CHROME_BRANDING=\"0\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5345,6 +5339,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "build/branding_buildflags.h",
     ],
@@ -5428,7 +5424,7 @@
 }
 
 // GN: //build:chromecast_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromecast_buildflags__android_arm",
     cmd: "echo '--flags IS_CASTOS=\"false\" IS_CAST_ANDROID=\"false\" ENABLE_CAST_RECEIVER=\"false\" IS_CHROMECAST=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5448,7 +5444,7 @@
 }
 
 // GN: //build:chromecast_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromecast_buildflags__android_arm64",
     cmd: "echo '--flags IS_CASTOS=\"false\" IS_CAST_ANDROID=\"false\" ENABLE_CAST_RECEIVER=\"false\" IS_CHROMECAST=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5468,7 +5464,7 @@
 }
 
 // GN: //build:chromecast_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromecast_buildflags__android_x86",
     cmd: "echo '--flags IS_CASTOS=\"false\" IS_CAST_ANDROID=\"false\" ENABLE_CAST_RECEIVER=\"false\" IS_CHROMECAST=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5488,7 +5484,7 @@
 }
 
 // GN: //build:chromecast_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromecast_buildflags__android_x86_64",
     cmd: "echo '--flags IS_CASTOS=\"false\" IS_CAST_ANDROID=\"false\" ENABLE_CAST_RECEIVER=\"false\" IS_CHROMECAST=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5508,7 +5504,7 @@
 }
 
 // GN: //build:chromecast_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromecast_buildflags__host",
     cmd: "echo '--flags IS_CASTOS=\"false\" IS_CAST_ANDROID=\"false\" ENABLE_CAST_RECEIVER=\"false\" IS_CHROMECAST=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5519,6 +5515,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "build/chromecast_buildflags.h",
     ],
@@ -5528,7 +5526,7 @@
 }
 
 // GN: //build:chromeos_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromeos_buildflags__android_arm",
     cmd: "echo '--flags IS_CHROMEOS_DEVICE=\"false\" IS_CHROMEOS_LACROS=\"false\" IS_CHROMEOS_ASH=\"false\" IS_CHROMEOS_WITH_HW_DETAILS=\"false\" IS_REVEN=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5548,7 +5546,7 @@
 }
 
 // GN: //build:chromeos_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromeos_buildflags__android_arm64",
     cmd: "echo '--flags IS_CHROMEOS_DEVICE=\"false\" IS_CHROMEOS_LACROS=\"false\" IS_CHROMEOS_ASH=\"false\" IS_CHROMEOS_WITH_HW_DETAILS=\"false\" IS_REVEN=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5568,7 +5566,7 @@
 }
 
 // GN: //build:chromeos_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromeos_buildflags__android_x86",
     cmd: "echo '--flags IS_CHROMEOS_DEVICE=\"false\" IS_CHROMEOS_LACROS=\"false\" IS_CHROMEOS_ASH=\"false\" IS_CHROMEOS_WITH_HW_DETAILS=\"false\" IS_REVEN=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5588,7 +5586,7 @@
 }
 
 // GN: //build:chromeos_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromeos_buildflags__android_x86_64",
     cmd: "echo '--flags IS_CHROMEOS_DEVICE=\"false\" IS_CHROMEOS_LACROS=\"false\" IS_CHROMEOS_ASH=\"false\" IS_CHROMEOS_WITH_HW_DETAILS=\"false\" IS_REVEN=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5608,7 +5606,7 @@
 }
 
 // GN: //build:chromeos_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_build_chromeos_buildflags__host",
     cmd: "echo '--flags IS_CHROMEOS_DEVICE=\"false\" IS_CHROMEOS_LACROS=\"false\" IS_CHROMEOS_ASH=\"false\" IS_CHROMEOS_WITH_HW_DETAILS=\"false\" IS_REVEN=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5619,6 +5617,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "build/chromeos_buildflags.h",
     ],
@@ -5628,7 +5628,7 @@
 }
 
 // GN: //build/config/compiler:compiler_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_build_config_compiler_compiler_buildflags__android_arm",
     cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"1\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5648,7 +5648,7 @@
 }
 
 // GN: //build/config/compiler:compiler_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_config_compiler_compiler_buildflags__android_arm64",
     cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"1\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5668,7 +5668,7 @@
 }
 
 // GN: //build/config/compiler:compiler_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_build_config_compiler_compiler_buildflags__android_x86",
     cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"1\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5688,7 +5688,7 @@
 }
 
 // GN: //build/config/compiler:compiler_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_build_config_compiler_compiler_buildflags__android_x86_64",
     cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"1\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5708,7 +5708,7 @@
 }
 
 // GN: //build/config/compiler:compiler_buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_build_config_compiler_compiler_buildflags__host",
     cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"2\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -5719,6 +5719,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "build/config/compiler/compiler_buildflags.h",
     ],
@@ -6023,7 +6025,7 @@
 }
 
 // GN: //components/cronet/android:buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_buildflags__android_arm",
     cmd: "echo '--flags INTEGRATED_MODE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -6043,7 +6045,7 @@
 }
 
 // GN: //components/cronet/android:buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_buildflags__android_arm64",
     cmd: "echo '--flags INTEGRATED_MODE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -6063,7 +6065,7 @@
 }
 
 // GN: //components/cronet/android:buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_buildflags__android_x86",
     cmd: "echo '--flags INTEGRATED_MODE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -6083,7 +6085,7 @@
 }
 
 // GN: //components/cronet/android:buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_buildflags__android_x86_64",
     cmd: "echo '--flags INTEGRATED_MODE=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -6297,7 +6299,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_headers__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_headers__android_arm",
     srcs: [
         "components/cronet/android/java/src/org/chromium/net/impl/CronetBidirectionalStream.java",
@@ -6352,7 +6354,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_headers__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_headers__android_arm64",
     srcs: [
         "components/cronet/android/java/src/org/chromium/net/impl/CronetBidirectionalStream.java",
@@ -6407,7 +6409,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_headers__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_headers__android_x86",
     srcs: [
         "components/cronet/android/java/src/org/chromium/net/impl/CronetBidirectionalStream.java",
@@ -6462,7 +6464,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_headers__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_headers__android_x86_64",
     srcs: [
         "components/cronet/android/java/src/org/chromium/net/impl/CronetBidirectionalStream.java",
@@ -6517,7 +6519,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_registration__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_registration__android_arm",
     srcs: [
         "base/android/java/src/org/chromium/base/ActivityState.java",
@@ -6825,7 +6827,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_registration__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_registration__android_arm64",
     srcs: [
         "base/android/java/src/org/chromium/base/ActivityState.java",
@@ -7133,7 +7135,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_registration__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_registration__android_x86",
     srcs: [
         "base/android/java/src/org/chromium/base/ActivityState.java",
@@ -7441,7 +7443,7 @@
 }
 
 // GN: //components/cronet/android:cronet_jni_registration__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_android_cronet_jni_registration__android_x86_64",
     srcs: [
         "base/android/java/src/org/chromium/base/ActivityState.java",
@@ -7894,7 +7896,7 @@
 }
 
 // GN: //components/cronet:cronet_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_buildflags__android_arm",
     cmd: "echo '--flags DISABLE_HISTOGRAM_SUPPORT=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -7914,7 +7916,7 @@
 }
 
 // GN: //components/cronet:cronet_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_buildflags__android_arm64",
     cmd: "echo '--flags DISABLE_HISTOGRAM_SUPPORT=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -7934,7 +7936,7 @@
 }
 
 // GN: //components/cronet:cronet_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_buildflags__android_x86",
     cmd: "echo '--flags DISABLE_HISTOGRAM_SUPPORT=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -7954,7 +7956,7 @@
 }
 
 // GN: //components/cronet:cronet_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_buildflags__android_x86_64",
     cmd: "echo '--flags DISABLE_HISTOGRAM_SUPPORT=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -8147,7 +8149,7 @@
 }
 
 // GN: //components/cronet:cronet_version_header_action__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_version_header_action__android_arm",
     cmd: "$(location build/util/version.py) -f " +
          "$(location chrome/VERSION) " +
@@ -8170,7 +8172,7 @@
 }
 
 // GN: //components/cronet:cronet_version_header_action__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_version_header_action__android_arm64",
     cmd: "$(location build/util/version.py) -f " +
          "$(location chrome/VERSION) " +
@@ -8193,7 +8195,7 @@
 }
 
 // GN: //components/cronet:cronet_version_header_action__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_version_header_action__android_x86",
     cmd: "$(location build/util/version.py) -f " +
          "$(location chrome/VERSION) " +
@@ -8216,7 +8218,7 @@
 }
 
 // GN: //components/cronet:cronet_version_header_action__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_cronet_cronet_version_header_action__android_x86_64",
     cmd: "$(location build/util/version.py) -f " +
          "$(location chrome/VERSION) " +
@@ -8625,6 +8627,7 @@
     shared_libs: [
         "libandroid",
         "liblog",
+        "libprotobuf-cpp-lite",
     ],
     static_libs: [
         "cronet_aml_base_allocator_partition_allocator_partition_alloc",
@@ -8691,7 +8694,7 @@
 }
 
 // GN: //components/nacl/common:buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_components_nacl_common_buildflags__host",
     cmd: "echo '--flags ENABLE_NACL=\"true\" IS_MINIMAL_TOOLCHAIN=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -8702,6 +8705,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "components/nacl/common/buildflags.h",
     ],
@@ -8711,7 +8716,7 @@
 }
 
 // GN: //components/prefs/android:jni_headers__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_components_prefs_android_jni_headers__android_arm",
     srcs: [
         "components/prefs/android/java/src/org/chromium/components/prefs/PrefService.java",
@@ -8742,7 +8747,7 @@
 }
 
 // GN: //components/prefs/android:jni_headers__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_prefs_android_jni_headers__android_arm64",
     srcs: [
         "components/prefs/android/java/src/org/chromium/components/prefs/PrefService.java",
@@ -8773,7 +8778,7 @@
 }
 
 // GN: //components/prefs/android:jni_headers__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_components_prefs_android_jni_headers__android_x86",
     srcs: [
         "components/prefs/android/java/src/org/chromium/components/prefs/PrefService.java",
@@ -8804,7 +8809,7 @@
 }
 
 // GN: //components/prefs/android:jni_headers__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_components_prefs_android_jni_headers__android_x86_64",
     srcs: [
         "components/prefs/android/java/src/org/chromium/components/prefs/PrefService.java",
@@ -8973,7 +8978,7 @@
 }
 
 // GN: //crypto:buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_crypto_buildflags__android_arm",
     cmd: "echo '--flags USE_NSS_CERTS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -8993,7 +8998,7 @@
 }
 
 // GN: //crypto:buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_crypto_buildflags__android_arm64",
     cmd: "echo '--flags USE_NSS_CERTS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9013,7 +9018,7 @@
 }
 
 // GN: //crypto:buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_crypto_buildflags__android_x86",
     cmd: "echo '--flags USE_NSS_CERTS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9033,7 +9038,7 @@
 }
 
 // GN: //crypto:buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_crypto_buildflags__android_x86_64",
     cmd: "echo '--flags USE_NSS_CERTS=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9053,7 +9058,7 @@
 }
 
 // GN: //crypto:buildflags__host
-genrule {
+cc_genrule {
     name: "cronet_aml_crypto_buildflags__host",
     cmd: "echo '--flags USE_NSS_CERTS=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9064,6 +9069,8 @@
          ". " +
          "--definitions " +
          "/dev/stdin",
+    host_supported: true,
+    device_supported: false,
     out: [
         "crypto/crypto_buildflags.h",
     ],
@@ -9597,7 +9604,7 @@
 }
 
 // GN: //net/base/registry_controlled_domains:registry_controlled_domains__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__android_arm",
     cmd: "$(location net/tools/dafsa/make_dafsa.py) --reverse " +
          "$(location net/base/registry_controlled_domains/effective_tld_names.gperf) " +
@@ -9648,7 +9655,7 @@
 }
 
 // GN: //net/base/registry_controlled_domains:registry_controlled_domains__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__android_arm64",
     cmd: "$(location net/tools/dafsa/make_dafsa.py) --reverse " +
          "$(location net/base/registry_controlled_domains/effective_tld_names.gperf) " +
@@ -9699,7 +9706,7 @@
 }
 
 // GN: //net/base/registry_controlled_domains:registry_controlled_domains__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__android_x86",
     cmd: "$(location net/tools/dafsa/make_dafsa.py) --reverse " +
          "$(location net/base/registry_controlled_domains/effective_tld_names.gperf) " +
@@ -9750,7 +9757,7 @@
 }
 
 // GN: //net/base/registry_controlled_domains:registry_controlled_domains__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__android_x86_64",
     cmd: "$(location net/tools/dafsa/make_dafsa.py) --reverse " +
          "$(location net/base/registry_controlled_domains/effective_tld_names.gperf) " +
@@ -9801,7 +9808,7 @@
 }
 
 // GN: //net:buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_net_buildflags__android_arm",
     cmd: "echo '--flags POSIX_BYPASS_MMAP=\"true\" DISABLE_FILE_SUPPORT=\"true\" ENABLE_MDNS=\"false\" ENABLE_REPORTING=\"true\" ENABLE_WEBSOCKETS=\"false\" INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST=\"false\" USE_KERBEROS=\"true\" USE_EXTERNAL_GSSAPI=\"false\" TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED=\"false\" CHROME_ROOT_STORE_SUPPORTED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9821,7 +9828,7 @@
 }
 
 // GN: //net:buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_buildflags__android_arm64",
     cmd: "echo '--flags POSIX_BYPASS_MMAP=\"true\" DISABLE_FILE_SUPPORT=\"true\" ENABLE_MDNS=\"false\" ENABLE_REPORTING=\"true\" ENABLE_WEBSOCKETS=\"false\" INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST=\"false\" USE_KERBEROS=\"true\" USE_EXTERNAL_GSSAPI=\"false\" TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED=\"false\" CHROME_ROOT_STORE_SUPPORTED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9841,7 +9848,7 @@
 }
 
 // GN: //net:buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_net_buildflags__android_x86",
     cmd: "echo '--flags POSIX_BYPASS_MMAP=\"false\" DISABLE_FILE_SUPPORT=\"true\" ENABLE_MDNS=\"false\" ENABLE_REPORTING=\"true\" ENABLE_WEBSOCKETS=\"false\" INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST=\"false\" USE_KERBEROS=\"true\" USE_EXTERNAL_GSSAPI=\"false\" TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED=\"false\" CHROME_ROOT_STORE_SUPPORTED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9861,7 +9868,7 @@
 }
 
 // GN: //net:buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_buildflags__android_x86_64",
     cmd: "echo '--flags POSIX_BYPASS_MMAP=\"true\" DISABLE_FILE_SUPPORT=\"true\" ENABLE_MDNS=\"false\" ENABLE_REPORTING=\"true\" ENABLE_WEBSOCKETS=\"false\" INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST=\"false\" USE_KERBEROS=\"true\" USE_EXTERNAL_GSSAPI=\"false\" TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED=\"false\" CHROME_ROOT_STORE_SUPPORTED=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -9943,7 +9950,7 @@
 }
 
 // GN: //net/data/ssl/chrome_root_store:gen_root_store_inc__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_net_data_ssl_chrome_root_store_gen_root_store_inc__android_arm",
     cmd: "$(location build/gn_run_binary.py) clang_x64/root_store_tool " +
          "--root-store " +
@@ -9966,7 +9973,7 @@
 }
 
 // GN: //net/data/ssl/chrome_root_store:gen_root_store_inc__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_data_ssl_chrome_root_store_gen_root_store_inc__android_arm64",
     cmd: "$(location build/gn_run_binary.py) clang_x64/root_store_tool " +
          "--root-store " +
@@ -9989,7 +9996,7 @@
 }
 
 // GN: //net/data/ssl/chrome_root_store:gen_root_store_inc__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_net_data_ssl_chrome_root_store_gen_root_store_inc__android_x86",
     cmd: "$(location build/gn_run_binary.py) clang_x64/root_store_tool " +
          "--root-store " +
@@ -10012,7 +10019,7 @@
 }
 
 // GN: //net/data/ssl/chrome_root_store:gen_root_store_inc__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_data_ssl_chrome_root_store_gen_root_store_inc__android_x86_64",
     cmd: "$(location build/gn_run_binary.py) clang_x64/root_store_tool " +
          "--root-store " +
@@ -10987,7 +10994,7 @@
 }
 
 // GN: //net:ios_cronet_buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_net_ios_cronet_buildflags__android_arm",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -11007,7 +11014,7 @@
 }
 
 // GN: //net:ios_cronet_buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_ios_cronet_buildflags__android_arm64",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -11027,7 +11034,7 @@
 }
 
 // GN: //net:ios_cronet_buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_net_ios_cronet_buildflags__android_x86",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -11047,7 +11054,7 @@
 }
 
 // GN: //net:ios_cronet_buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_ios_cronet_buildflags__android_x86_64",
     cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -11067,7 +11074,7 @@
 }
 
 // GN: //net:isolation_info_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_isolation_info_proto_gen",
     srcs: [
         "net/base/isolation_info.proto",
@@ -11082,7 +11089,7 @@
 }
 
 // GN: //net:isolation_info_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_isolation_info_proto_gen_headers",
     srcs: [
         "net/base/isolation_info.proto",
@@ -11801,6 +11808,7 @@
     shared_libs: [
         "libandroid",
         "liblog",
+        "libprotobuf-cpp-lite",
     ],
     static_libs: [
         "cronet_aml_base_allocator_partition_allocator_partition_alloc",
@@ -11955,7 +11963,7 @@
 }
 
 // GN: //net:net_jni_headers__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_net_net_jni_headers__android_arm",
     srcs: [
         "net/android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
@@ -12058,7 +12066,7 @@
 }
 
 // GN: //net:net_jni_headers__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_net_jni_headers__android_arm64",
     srcs: [
         "net/android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
@@ -12161,7 +12169,7 @@
 }
 
 // GN: //net:net_jni_headers__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_net_net_jni_headers__android_x86",
     srcs: [
         "net/android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
@@ -12264,7 +12272,7 @@
 }
 
 // GN: //net:net_jni_headers__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_net_net_jni_headers__android_x86_64",
     srcs: [
         "net/android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
@@ -12367,7 +12375,7 @@
 }
 
 // GN: //net:net_nqe_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_net_nqe_proto_gen",
     srcs: [
         "net/nqe/proto/network_id_proto.proto",
@@ -12382,7 +12390,7 @@
 }
 
 // GN: //net:net_nqe_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_net_nqe_proto_gen_headers",
     srcs: [
         "net/nqe/proto/network_id_proto.proto",
@@ -12411,6 +12419,7 @@
     shared_libs: [
         "libandroid",
         "liblog",
+        "libprotobuf-cpp-lite",
     ],
     static_libs: [
         "cronet_aml_base_allocator_partition_allocator_partition_alloc",
@@ -12571,7 +12580,7 @@
 }
 
 // GN: //net/third_party/quiche:net_quic_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_third_party_quiche_net_quic_proto_gen",
     srcs: [
         "net/third_party/quiche/src/quiche/quic/core/proto/cached_network_parameters.proto",
@@ -12590,7 +12599,7 @@
 }
 
 // GN: //net/third_party/quiche:net_quic_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_third_party_quiche_net_quic_proto_gen_headers",
     srcs: [
         "net/third_party/quiche/src/quiche/quic/core/proto/cached_network_parameters.proto",
@@ -12614,7 +12623,7 @@
 }
 
 // GN: //net/third_party/quiche:net_quic_test_tools_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen",
     srcs: [
         "net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.proto",
@@ -12629,7 +12638,7 @@
 }
 
 // GN: //net/third_party/quiche:net_quic_test_tools_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
     srcs: [
         "net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.proto",
@@ -12983,6 +12992,7 @@
     shared_libs: [
         "libandroid",
         "liblog",
+        "libprotobuf-cpp-lite",
     ],
     static_libs: [
         "cronet_aml_base_allocator_partition_allocator_partition_alloc",
@@ -23436,7 +23446,7 @@
 }
 
 // GN: //third_party/metrics_proto:metrics_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_third_party_metrics_proto_metrics_proto_gen",
     srcs: [
         "third_party/metrics_proto/call_stack_profile.proto",
@@ -23503,7 +23513,7 @@
 }
 
 // GN: //third_party/metrics_proto:metrics_proto
-genrule {
+cc_genrule {
     name: "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
     srcs: [
         "third_party/metrics_proto/call_stack_profile.proto",
@@ -24646,7 +24656,7 @@
 }
 
 // GN: //url:buildflags__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_url_buildflags__android_arm",
     cmd: "echo '--flags USE_PLATFORM_ICU_ALTERNATIVES=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -24666,7 +24676,7 @@
 }
 
 // GN: //url:buildflags__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_url_buildflags__android_arm64",
     cmd: "echo '--flags USE_PLATFORM_ICU_ALTERNATIVES=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -24686,7 +24696,7 @@
 }
 
 // GN: //url:buildflags__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_url_buildflags__android_x86",
     cmd: "echo '--flags USE_PLATFORM_ICU_ALTERNATIVES=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -24706,7 +24716,7 @@
 }
 
 // GN: //url:buildflags__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_url_buildflags__android_x86_64",
     cmd: "echo '--flags USE_PLATFORM_ICU_ALTERNATIVES=\"true\"' | " +
          "$(location build/write_buildflag_header.py) --output " +
@@ -24873,7 +24883,7 @@
 }
 
 // GN: //url:url_jni_headers__android_arm
-genrule {
+cc_genrule {
     name: "cronet_aml_url_url_jni_headers__android_arm",
     srcs: [
         "url/android/java/src/org/chromium/url/IDNStringUtil.java",
@@ -24910,7 +24920,7 @@
 }
 
 // GN: //url:url_jni_headers__android_arm64
-genrule {
+cc_genrule {
     name: "cronet_aml_url_url_jni_headers__android_arm64",
     srcs: [
         "url/android/java/src/org/chromium/url/IDNStringUtil.java",
@@ -24947,7 +24957,7 @@
 }
 
 // GN: //url:url_jni_headers__android_x86
-genrule {
+cc_genrule {
     name: "cronet_aml_url_url_jni_headers__android_x86",
     srcs: [
         "url/android/java/src/org/chromium/url/IDNStringUtil.java",
@@ -24984,7 +24994,7 @@
 }
 
 // GN: //url:url_jni_headers__android_x86_64
-genrule {
+cc_genrule {
     name: "cronet_aml_url_url_jni_headers__android_x86_64",
     srcs: [
         "url/android/java/src/org/chromium/url/IDNStringUtil.java",
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index addcaac..e9095db 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -390,7 +390,10 @@
     return write_blueprint_key_value(output, name, value, sort)
 
   def is_compiled(self):
-    return self.type not in ('genrule', 'filegroup', 'cc_defaults')
+    return self.type not in ('filegroup', 'cc_defaults')
+
+  def is_genrule(self):
+    return self.type == "cc_genrule"
 
   def has_input_files(self):
     for target in self.target.values():
@@ -485,7 +488,7 @@
     cmd += ['--descriptor_set_out=$(out)']
     cmd += ['$(in)']
 
-    descriptor_module = Module('genrule', target_module_name, target.name)
+    descriptor_module = Module('cc_genrule', target_module_name, target.name)
     descriptor_module.cmd = ' '.join(cmd)
     descriptor_module.out = [out]
     descriptor_module.tools = tools
@@ -508,12 +511,12 @@
   # source files in 'srcs' and headers in 'generated_headers' -- and it's not
   # valid to generate .h files from a source dependency and vice versa.
   source_module_name = target_module_name + '_gen'
-  source_module = Module('genrule', source_module_name, target.name)
+  source_module = Module('cc_genrule', source_module_name, target.name)
   blueprint.add_module(source_module)
   source_module.srcs.update(
       gn_utils.label_to_path(src) for src in target.sources)
 
-  header_module = Module('genrule', source_module_name + '_headers',
+  header_module = Module('cc_genrule', source_module_name + '_headers',
                          target.name)
   blueprint.add_module(header_module)
   header_module.srcs = set(source_module.srcs)
@@ -626,7 +629,7 @@
 
 def create_action_module(blueprint, target):
   bp_module_name = label_to_module_name(target.name)
-  module = Module('genrule', bp_module_name, target.name)
+  module = Module('cc_genrule', bp_module_name, target.name)
 
   # Convert ['--param=value'] to ['--param', 'value'] for consistency.
   # TODO: we may want to only do this for python scripts arguments. If argparse
@@ -911,7 +914,13 @@
         module.target[arch_name].cflags.add('-march=armv8-a+memtag')
       set_module_include_dirs(module.target[arch_name], arch.cflags, arch.include_dirs)
 
-  if module.is_compiled():
+  if module.is_genrule():
+    # cc_genrule is compiled but it's never used to actually compile c++ files
+    # so there is no need to add flags/include_dirs and other compilation args.
+    module.host_supported = target.host_supported()
+    module.device_supported = target.device_supported()
+
+  if module.is_compiled() and not module.is_genrule():
     module.host_supported = target.host_supported()
     module.device_supported = target.device_supported()
 
@@ -933,6 +942,10 @@
     module.local_include_dirs = [d for d in module.local_include_dirs
                                  if d not in local_include_dirs_denylist]
 
+  # If the module is a static library, export all the generated headers.
+  if module.type == 'cc_library_static':
+    module.export_generated_headers = module.generated_headers
+
   # dep_name is an unmangled GN target name (e.g. //foo:bar(toolchain)).
   # Currently, only one module is generated from target even target has multiple toolchains.
   # And module is generated based on the first visited target.
@@ -957,14 +970,15 @@
     # Following rule works for adding android_runtime_jni_headers to base:base.
     # If this doesn't work for other target, hardcoding for specific target
     # might be better.
-    if module.type == "genrule" and dep_module.type == "genrule":
-        module.genrule_headers.add(dep_module.name)
-        module.genrule_headers.update(dep_module.genrule_headers)
+    if module.is_genrule() and dep_module.is_genrule():
+      module.genrule_headers.add(dep_module.name)
+      module.genrule_headers.update(dep_module.genrule_headers)
 
     # For filegroups, and genrule, recurse but don't apply the
     # deps.
-    if not module.is_compiled():
+    if not module.is_compiled() or module.is_genrule():
       continue
+
     if dep_module.type == 'cc_library_shared':
       module.shared_libs.add(dep_module.name)
     elif dep_module.type == 'cc_library_static':
@@ -978,15 +992,14 @@
           module.srcs.add(":" + dep_module.name)
         module.merge_key('export_generated_headers', dep_module,
                          target.arch.keys(), 'generated_headers')
-    elif dep_module.type == 'genrule':
-      for arch_name, arch in target.arch.items():
-        if dep_module.name.endswith(arch_name):
-          add_genrule_per_arch(module.target[arch_name], dep_module, module.type)
-      if dep_module.name.endswith("_gen"):
-        module.srcs.update(dep_module.genrule_srcs)
-        module.generated_headers.update(dep_module.genrule_headers)
-        if module.type != "cc_object":
-          module.export_generated_headers.update(dep_module.genrule_headers)
+    elif dep_module.type == 'cc_genrule':
+      module.merge_key('generated_headers', dep_module, [], 'genrule_headers')
+      module.merge_key('srcs', dep_module, [], 'genrule_srcs')
+      module.merge_key('shared_libs', dep_module, [], 'genrule_shared_libs')
+      module.merge_key('header_libs', dep_module, [], 'genrule_header_libs')
+      if module.type not in ["cc_object"]:
+        module.merge_key('export_generated_headers', dep_module, [],
+                         'genrule_headers')
     elif dep_module.type == 'cc_binary':
       continue  # Ignore executables deps (used by cmdline integration tests).
     else:
@@ -1000,6 +1013,15 @@
       # Revisit this approach once we need to support more target types.
       if dep_module.type == 'cc_library_static':
         module.target[arch_name].static_libs.add(dep_module.name)
+      elif dep_module.type == 'cc_genrule':
+        if dep_module.name.endswith(arch_name):
+          module.target[arch_name].generated_headers.update(dep_module.genrule_headers)
+          module.target[arch_name].srcs.update(dep_module.genrule_srcs)
+          module.target[arch_name].shared_libs.update(dep_module.genrule_shared_libs)
+          module.target[arch_name].header_libs.update(dep_module.genrule_header_libs)
+          if module.type not in ["cc_object"]:
+            module.target[arch_name].export_generated_headers.update(
+              dep_module.genrule_headers)
       else:
         raise Error('Unsupported arch-specific dependency %s of target %s with type %s' %
                     (dep_module.name, target.name, dep_module.type))
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 6d2bf17..90832b2 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -365,7 +365,7 @@
         target.update(dep, arch)  # Bubble up groups's cflags/ldflags etc.
       elif dep.type in ['action', 'action_foreach', 'copy']:
         if proto_target_type is None:
-          target.deps.add(dep.name)
+          target.arch[arch].deps.add(dep.name)
       elif dep.type in LINKER_UNIT_TYPES:
         target.arch[arch].deps.add(dep.name)
       elif dep.type == 'java_group':