Merge "Add dependency to version script when linking stub libraries"

am: d1fcc4a93d

Change-Id: I3b9010ddaa6ff810d883ad7cffbc56cb513546dc
This commit is contained in:
Dan Willemsen
2019-06-10 21:11:11 -07:00
committed by android-build-merger
3 changed files with 3 additions and 0 deletions

View File

@@ -134,6 +134,7 @@ func (stub *llndkStubDecorator) link(ctx ModuleContext, flags Flags, deps PathDe
if !Bool(stub.Properties.Unversioned) { if !Bool(stub.Properties.Unversioned) {
linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String() linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String()
flags.LdFlags = append(flags.LdFlags, linkerScriptFlag) flags.LdFlags = append(flags.LdFlags, linkerScriptFlag)
flags.LdFlagsDeps = append(flags.LdFlagsDeps, stub.versionScriptPath)
} }
if len(stub.Properties.Export_preprocessed_headers) > 0 { if len(stub.Properties.Export_preprocessed_headers) > 0 {

View File

@@ -337,6 +337,7 @@ func (stub *stubDecorator) link(ctx ModuleContext, flags Flags, deps PathDeps,
if useVersionScript { if useVersionScript {
linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String() linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String()
flags.LdFlags = append(flags.LdFlags, linkerScriptFlag) flags.LdFlags = append(flags.LdFlags, linkerScriptFlag)
flags.LdFlagsDeps = append(flags.LdFlagsDeps, stub.versionScriptPath)
} }
return stub.libraryDecorator.link(ctx, flags, deps, objs) return stub.libraryDecorator.link(ctx, flags, deps, objs)

View File

@@ -125,6 +125,7 @@ func (stub *vendorPublicLibraryStubDecorator) link(ctx ModuleContext, flags Flag
if !Bool(stub.Properties.Unversioned) { if !Bool(stub.Properties.Unversioned) {
linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String() linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String()
flags.LdFlags = append(flags.LdFlags, linkerScriptFlag) flags.LdFlags = append(flags.LdFlags, linkerScriptFlag)
flags.LdFlagsDeps = append(flags.LdFlagsDeps, stub.versionScriptPath)
} }
return stub.libraryDecorator.link(ctx, flags, deps, objs) return stub.libraryDecorator.link(ctx, flags, deps, objs)
} }