Add dependency to version script when linking stub libraries
This isn't an effective issue with local builds currently, since the version script is generated from the same rule as the sources used to compile the objects that are also used in the link command. But if we ever separated those paths or adopted restat, we could miss this dependency. This is also required for my RBE build to actually expose this file to the link step. Test: treehugger Change-Id: I32bbb18cf7edddc88759d4f445d081868f3e9b44
This commit is contained in:
parent
b6fd6f75f2
commit
939408aa22
3 changed files with 3 additions and 0 deletions
|
@ -134,6 +134,7 @@ func (stub *llndkStubDecorator) link(ctx ModuleContext, flags Flags, deps PathDe
|
|||
if !Bool(stub.Properties.Unversioned) {
|
||||
linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String()
|
||||
flags.LdFlags = append(flags.LdFlags, linkerScriptFlag)
|
||||
flags.LdFlagsDeps = append(flags.LdFlagsDeps, stub.versionScriptPath)
|
||||
}
|
||||
|
||||
if len(stub.Properties.Export_preprocessed_headers) > 0 {
|
||||
|
|
|
@ -337,6 +337,7 @@ func (stub *stubDecorator) link(ctx ModuleContext, flags Flags, deps PathDeps,
|
|||
if useVersionScript {
|
||||
linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String()
|
||||
flags.LdFlags = append(flags.LdFlags, linkerScriptFlag)
|
||||
flags.LdFlagsDeps = append(flags.LdFlagsDeps, stub.versionScriptPath)
|
||||
}
|
||||
|
||||
return stub.libraryDecorator.link(ctx, flags, deps, objs)
|
||||
|
|
|
@ -125,6 +125,7 @@ func (stub *vendorPublicLibraryStubDecorator) link(ctx ModuleContext, flags Flag
|
|||
if !Bool(stub.Properties.Unversioned) {
|
||||
linkerScriptFlag := "-Wl,--version-script," + stub.versionScriptPath.String()
|
||||
flags.LdFlags = append(flags.LdFlags, linkerScriptFlag)
|
||||
flags.LdFlagsDeps = append(flags.LdFlagsDeps, stub.versionScriptPath)
|
||||
}
|
||||
return stub.libraryDecorator.link(ctx, flags, deps, objs)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue