Merge "versioning macro is exported from prebuilt stubs as well"
This commit is contained in:
@@ -1237,9 +1237,7 @@ func (library *libraryDecorator) link(ctx ModuleContext,
|
||||
}
|
||||
|
||||
// Add stub-related flags if this library is a stub library.
|
||||
if library.buildStubs() && !library.skipAPIDefine {
|
||||
library.reexportFlags("-D" + versioningMacroName(ctx.Module().(*Module).ImplementationModuleName(ctx)) + "=" + library.stubsVersion())
|
||||
}
|
||||
library.exportVersioningMacroIfNeeded(ctx)
|
||||
|
||||
// Propagate a Provider containing information about exported flags, deps, and include paths.
|
||||
library.flagExporter.setProvider(ctx)
|
||||
@@ -1247,6 +1245,14 @@ func (library *libraryDecorator) link(ctx ModuleContext,
|
||||
return out
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) exportVersioningMacroIfNeeded(ctx android.BaseModuleContext) {
|
||||
if library.buildStubs() && !library.skipAPIDefine {
|
||||
name := versioningMacroName(ctx.Module().(*Module).ImplementationModuleName(ctx))
|
||||
ver := library.stubsVersion()
|
||||
library.reexportFlags("-D" + name + "=" + ver)
|
||||
}
|
||||
}
|
||||
|
||||
// buildStatic returns true if this library should be built as a static library.
|
||||
func (library *libraryDecorator) buildStatic() bool {
|
||||
return library.MutatedProperties.BuildStatic &&
|
||||
|
Reference in New Issue
Block a user