gn2bp: add //base linker scripts
There is currently no support in GnUtils for linker scripts (though, it
wouldn't be hard to add, so we should totally do that in the future).
Test: m cronet_aml_components_cronet_android_cronet
Change-Id: I84f7a084501e689d46b48951bb06b6e6be3c5883
diff --git a/Android.bp.swp b/Android.bp.swp
index d1a1158..33bfbcd 100644
--- a/Android.bp.swp
+++ b/Android.bp.swp
@@ -1944,6 +1944,12 @@
"jni_headers",
],
cpp_std: "c++20",
+ linker_scripts: [
+ "base/android/library_loader/anchor_functions.lds",
+ ],
+ cppflags: [
+ "-fexceptions",
+ ],
rtti: true,
}
@@ -4124,6 +4130,9 @@
"build/linux/debian_bullseye_amd64-sysroot/usr/include",
],
cpp_std: "c++20",
+ cppflags: [
+ "-fexceptions",
+ ],
rtti: true,
}
diff --git a/gen_android_bp b/gen_android_bp
index 22d69be..9ce33b8 100755
--- a/gen_android_bp
+++ b/gen_android_bp
@@ -113,6 +113,11 @@
# Additional arguments to apply to Android.bp rules.
additional_args = {
# TODO: remove if not needed.
+ 'cronet_aml_components_cronet_android_cronet': [
+ ('linker_scripts', {
+ 'base/android/library_loader/anchor_functions.lds',
+ }),
+ ],
'cronet_aml_net_net': [
('export_static_lib_headers', {
'cronet_aml_net_third_party_quiche_quiche',
@@ -384,6 +389,7 @@
self.apex_available = set()
self.min_sdk_version = None
self.proto = dict()
+ self.linker_scripts = set()
# The genrule_XXX below are properties that must to be propagated back
# on the module(s) that depend on the genrule.
self.genrule_headers = set()
@@ -438,6 +444,7 @@
self._output_field(output, 'test_config')
self._output_field(output, 'stubs')
self._output_field(output, 'proto')
+ self._output_field(output, 'linker_scripts')
self._output_field(output, 'cppflags')
if self.rtti:
self._output_field(output, 'rtti')