[Cronet] Remove static_libs from genrules
Also adds soong_namespace to bp: cc: aosp/2493857
Test: th
Bug: 274094720
Change-Id: Iddcfee5da5d155708ba164783242c9e1e13b070d
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 19901fa..c6e508c 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -14,6 +14,8 @@
//
// This file is automatically generated by gen_android_bp. Do not edit.
+soong_namespace {}
+
build = ["Android.extras.bp"]
// The actual license can be found in Android.extras.bp
@@ -16656,10 +16658,6 @@
"net/third_party/quiche/src/quiche/quic/core/proto/crypto_server_config.proto",
"net/third_party/quiche/src/quiche/quic/core/proto/source_address_token.proto",
],
- shared_libs: [
- "//external/cronet/third_party/boringssl:libcrypto",
- "//external/cronet/third_party/boringssl:libssl",
- ],
tools: [
"cronet_aml_third_party_protobuf_protoc",
],
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index b55b9bf..23edbff 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -235,6 +235,9 @@
module.arch[arch].shared_libs.add('libz')
def enable_boringssl(module, arch):
+ # Do not add boringssl targets to cc_genrules. This happens, because protobuf targets are
+ # originally static_libraries, but later get converted to a cc_genrule.
+ if module.is_genrule(): return
if arch is None:
shared_libs = module.shared_libs
else:
@@ -1900,6 +1903,8 @@
//
// This file is automatically generated by %s. Do not edit.
+soong_namespace {}
+
build = ["Android.extras.bp"]
""" % (tool_name)
]