summaryrefslogtreecommitdiff
path: root/cc/bp2build.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/bp2build.go')
-rw-r--r--cc/bp2build.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cc/bp2build.go b/cc/bp2build.go
index 6f9726013..aea1fa188 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -813,6 +813,8 @@ func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module)
features := compilerAttrs.features.Clone().Append(linkerAttrs.features).Append(bp2buildSanitizerFeatures(ctx, module))
features.DeduplicateAxesFromBase()
+ addMuslSystemDynamicDeps(ctx, linkerAttrs)
+
return baseAttributes{
compilerAttrs,
linkerAttrs,
@@ -823,6 +825,16 @@ func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module)
}
}
+// As a workaround for b/261657184, we are manually adding the default value
+// of system_dynamic_deps for the linux_musl os.
+// TODO: Solve this properly
+func addMuslSystemDynamicDeps(ctx android.Bp2buildMutatorContext, attrs linkerAttributes) {
+ systemDynamicDeps := attrs.systemDynamicDeps.SelectValue(bazel.OsConfigurationAxis, "linux_musl")
+ if attrs.systemDynamicDeps.HasAxisSpecificValues(bazel.OsConfigurationAxis) && systemDynamicDeps.IsNil() {
+ attrs.systemDynamicDeps.SetSelectValue(bazel.OsConfigurationAxis, "linux_musl", android.BazelLabelForModuleDeps(ctx, config.MuslDefaultSharedLibraries))
+ }
+}
+
type fdoProfileAttributes struct {
Absolute_path_profile string
}