Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74fe471e authored by Ivan Lozano's avatar Ivan Lozano Committed by Gerrit Code Review
Browse files

Merge "rust: Fix rust_bindgen implicits"

parents 0eef27a5 ddd0bdb3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -96,8 +96,7 @@ func (b *bindgenDecorator) GenerateSource(ctx ModuleContext, deps PathDeps) andr
	var cflags []string
	var implicits android.Paths

	implicits = append(implicits, deps.depIncludePaths...)
	implicits = append(implicits, deps.depSystemIncludePaths...)
	implicits = append(implicits, deps.depGeneratedHeaders...)

	// Default clang flags
	cflags = append(cflags, "${cc_config.CommonClangGlobalCflags}")
+3 −0
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ type PathDeps struct {
	// Used by bindgen modules which call clang
	depClangFlags         []string
	depIncludePaths       android.Paths
	depGeneratedHeaders   android.Paths
	depSystemIncludePaths android.Paths

	coverageFiles android.Paths
@@ -875,6 +876,7 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
				if mod, ok := ccDep.(*cc.Module); ok {
					depPaths.depSystemIncludePaths = append(depPaths.depSystemIncludePaths, mod.ExportedSystemIncludeDirs()...)
					depPaths.depClangFlags = append(depPaths.depClangFlags, mod.ExportedFlags()...)
					depPaths.depGeneratedHeaders = append(depPaths.depGeneratedHeaders, mod.ExportedGeneratedHeaders()...)
				}
				depPaths.coverageFiles = append(depPaths.coverageFiles, ccDep.CoverageFiles()...)
				directStaticLibDeps = append(directStaticLibDeps, ccDep)
@@ -886,6 +888,7 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
				if mod, ok := ccDep.(*cc.Module); ok {
					depPaths.depSystemIncludePaths = append(depPaths.depSystemIncludePaths, mod.ExportedSystemIncludeDirs()...)
					depPaths.depClangFlags = append(depPaths.depClangFlags, mod.ExportedFlags()...)
					depPaths.depGeneratedHeaders = append(depPaths.depGeneratedHeaders, mod.ExportedGeneratedHeaders()...)
				}
				directSharedLibDeps = append(directSharedLibDeps, ccDep)
				mod.Properties.AndroidMkSharedLibs = append(mod.Properties.AndroidMkSharedLibs, depName)