Bp2build support for runtime_libs
Bug: 213201180
Test: Updated the minimal apex in the build/bazel cl to include runtime_libs so the apex diff test will test it
Change-Id: I10add1895cfa122a370d24196a33ec2dcfafccfc
diff --git a/cc/binary.go b/cc/binary.go
index b2f2482..849aafa 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -617,6 +617,7 @@
Dynamic_deps: baseAttrs.implementationDynamicDeps,
Whole_archive_deps: baseAttrs.wholeArchiveDeps,
System_deps: baseAttrs.systemDynamicDeps,
+ Runtime_deps: baseAttrs.runtimeDeps,
Local_includes: baseAttrs.localIncludes,
Absolute_includes: baseAttrs.absoluteIncludes,
@@ -667,6 +668,7 @@
Dynamic_deps bazel.LabelListAttribute
Whole_archive_deps bazel.LabelListAttribute
System_deps bazel.LabelListAttribute
+ Runtime_deps bazel.LabelListAttribute
Local_includes bazel.StringListAttribute
Absolute_includes bazel.StringListAttribute
diff --git a/cc/bp2build.go b/cc/bp2build.go
index 61a55ee..ba93439 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -52,6 +52,7 @@
Implementation_dynamic_deps bazel.LabelListAttribute
Whole_archive_deps bazel.LabelListAttribute
Implementation_whole_archive_deps bazel.LabelListAttribute
+ Runtime_deps bazel.LabelListAttribute
System_dynamic_deps bazel.LabelListAttribute
@@ -710,6 +711,7 @@
implementationDeps bazel.LabelListAttribute
dynamicDeps bazel.LabelListAttribute
implementationDynamicDeps bazel.LabelListAttribute
+ runtimeDeps bazel.LabelListAttribute
wholeArchiveDeps bazel.LabelListAttribute
implementationWholeArchiveDeps bazel.LabelListAttribute
systemDynamicDeps bazel.LabelListAttribute
@@ -825,6 +827,11 @@
if axisFeatures != nil {
la.features.SetSelectValue(axis, config, axisFeatures)
}
+
+ runtimeDeps := android.BazelLabelForModuleDepsExcludes(ctx, props.Runtime_libs, props.Exclude_runtime_libs)
+ if !runtimeDeps.IsEmpty() {
+ la.runtimeDeps.SetSelectValue(axis, config, runtimeDeps)
+ }
}
func (la *linkerAttributes) convertStripProps(ctx android.BazelConversionPathContext, module *Module) {
diff --git a/cc/library.go b/cc/library.go
index 897b572..c3c587d 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -319,6 +319,7 @@
Implementation_whole_archive_deps: linkerAttrs.implementationWholeArchiveDeps,
Whole_archive_deps: *linkerAttrs.wholeArchiveDeps.Clone().Append(staticAttrs.Whole_archive_deps),
System_dynamic_deps: *linkerAttrs.systemDynamicDeps.Clone().Append(staticAttrs.System_dynamic_deps),
+ Runtime_deps: linkerAttrs.runtimeDeps,
sdkAttributes: bp2BuildParseSdkAttributes(m),
}
@@ -335,6 +336,7 @@
Implementation_dynamic_deps: *linkerAttrs.implementationDynamicDeps.Clone().Append(sharedAttrs.Implementation_dynamic_deps),
Whole_archive_deps: *linkerAttrs.wholeArchiveDeps.Clone().Append(sharedAttrs.Whole_archive_deps),
System_dynamic_deps: *linkerAttrs.systemDynamicDeps.Clone().Append(sharedAttrs.System_dynamic_deps),
+ Runtime_deps: linkerAttrs.runtimeDeps,
sdkAttributes: bp2BuildParseSdkAttributes(m),
}
@@ -2552,6 +2554,7 @@
Implementation_whole_archive_deps: linkerAttrs.implementationWholeArchiveDeps,
System_dynamic_deps: linkerAttrs.systemDynamicDeps,
sdkAttributes: bp2BuildParseSdkAttributes(module),
+ Runtime_deps: linkerAttrs.runtimeDeps,
}
var attrs interface{}