diff options
Diffstat (limited to 'cc/binary.go')
-rw-r--r-- | cc/binary.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cc/binary.go b/cc/binary.go index a5afb0725..3f951eca5 100644 --- a/cc/binary.go +++ b/cc/binary.go @@ -18,6 +18,7 @@ import ( "path/filepath" "github.com/google/blueprint" + "github.com/google/blueprint/proptools" "android/soong/android" "android/soong/bazel" @@ -388,7 +389,7 @@ func (binary *binaryDecorator) link(ctx ModuleContext, } } - var validations android.WritablePaths + var validations android.Paths // Handle host bionic linker symbols. if ctx.Os() == android.LinuxBionic && !binary.static() { @@ -411,6 +412,7 @@ func (binary *binaryDecorator) link(ctx ModuleContext, linkerDeps = append(linkerDeps, deps.EarlySharedLibsDeps...) linkerDeps = append(linkerDeps, deps.SharedLibsDeps...) linkerDeps = append(linkerDeps, deps.LateSharedLibsDeps...) + linkerDeps = append(linkerDeps, ndkSharedLibDeps(ctx)...) } validations = append(validations, objs.tidyFiles...) @@ -578,9 +580,16 @@ func binaryBp2build(ctx android.TopDownMutatorContext, typ string) { } baseAttrs := bp2BuildParseBaseProps(ctx, m) + binaryLinkerAttrs := bp2buildBinaryLinkerProps(ctx, m) + + if proptools.BoolDefault(binaryLinkerAttrs.Linkshared, true) { + baseAttrs.implementationDynamicDeps.Add(baseAttrs.protoDependency) + } else { + baseAttrs.implementationDeps.Add(baseAttrs.protoDependency) + } attrs := &binaryAttributes{ - binaryLinkerAttrs: bp2buildBinaryLinkerProps(ctx, m), + binaryLinkerAttrs: binaryLinkerAttrs, Srcs: baseAttrs.srcs, Srcs_c: baseAttrs.cSrcs, |