Only export exported header libs

Test: m -j native
Change-Id: Ia0e5b28495e049ba8037884d2c498a1b59012bbe
This commit is contained in:
Colin Cross 2016-12-15 07:39:51 -08:00
parent 1bd40ba84b
commit 32ec36c631

View file

@ -227,7 +227,8 @@ var (
staticExportDepTag = dependencyTag{name: "static", library: true, reexportFlags: true} staticExportDepTag = dependencyTag{name: "static", library: true, reexportFlags: true}
lateStaticDepTag = dependencyTag{name: "late static", library: true} lateStaticDepTag = dependencyTag{name: "late static", library: true}
wholeStaticDepTag = dependencyTag{name: "whole static", library: true, reexportFlags: true} wholeStaticDepTag = dependencyTag{name: "whole static", library: true, reexportFlags: true}
headerDepTag = dependencyTag{name: "header", library: true, reexportFlags: true} headerDepTag = dependencyTag{name: "header", library: true}
headerExportDepTag = dependencyTag{name: "header", library: true, reexportFlags: true}
genSourceDepTag = dependencyTag{name: "gen source"} genSourceDepTag = dependencyTag{name: "gen source"}
genHeaderDepTag = dependencyTag{name: "gen header"} genHeaderDepTag = dependencyTag{name: "gen header"}
genHeaderExportDepTag = dependencyTag{name: "gen header", reexportFlags: true} genHeaderExportDepTag = dependencyTag{name: "gen header", reexportFlags: true}
@ -663,7 +664,13 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
deps.LateSharedLibs, variantLateNdkLibs = rewriteNdkLibs(deps.LateSharedLibs) deps.LateSharedLibs, variantLateNdkLibs = rewriteNdkLibs(deps.LateSharedLibs)
} }
actx.AddVariationDependencies(nil, headerDepTag, deps.HeaderLibs...) for _, lib := range deps.HeaderLibs {
depTag := headerDepTag
if inList(lib, deps.ReexportHeaderLibHeaders) {
depTag = headerExportDepTag
}
actx.AddVariationDependencies(nil, depTag, lib)
}
actx.AddVariationDependencies([]blueprint.Variation{{"link", "static"}}, wholeStaticDepTag, actx.AddVariationDependencies([]blueprint.Variation{{"link", "static"}}, wholeStaticDepTag,
deps.WholeStaticLibs...) deps.WholeStaticLibs...)