diff options
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go index e65b90e8a..5b9404504 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -229,6 +229,7 @@ type Deps struct { ProcMacros []string SharedLibs []string StaticLibs []string + HeaderLibs []string CrtBegin, CrtEnd string } @@ -838,6 +839,11 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { directSharedLibDeps = append(directSharedLibDeps, ccDep) mod.Properties.AndroidMkSharedLibs = append(mod.Properties.AndroidMkSharedLibs, depName) exportDep = true + case cc.IsHeaderDepTag(depTag): + exportedInfo := ctx.OtherModuleProvider(dep, cc.FlagExporterInfoProvider).(cc.FlagExporterInfo) + depPaths.depIncludePaths = append(depPaths.depIncludePaths, exportedInfo.IncludeDirs...) + depPaths.depSystemIncludePaths = append(depPaths.depSystemIncludePaths, exportedInfo.SystemIncludeDirs...) + depPaths.depGeneratedHeaders = append(depPaths.depGeneratedHeaders, exportedInfo.GeneratedHeaders...) case depTag == cc.CrtBeginDepTag: depPaths.CrtBegin = linkObject case depTag == cc.CrtEndDepTag: @@ -983,6 +989,8 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) { blueprint.Variation{Mutator: "link", Variation: "static"}), cc.StaticDepTag(), deps.StaticLibs...) + actx.AddVariationDependencies(nil, cc.HeaderDepTag(), deps.HeaderLibs...) + crtVariations := cc.GetCrtVariations(ctx, mod) if deps.CrtBegin != "" { actx.AddVariationDependencies(crtVariations, cc.CrtBeginDepTag, deps.CrtBegin) |