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

This commit is contained in:
Treehugger Robot
2019-06-11 03:59:42 +00:00
committed by Gerrit Code Review
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)
} }