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

Commit a0d58893 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Ensure consistent handling of generated headers/dirs"

parents 1c1c6ab4 5efd1985
Loading
Loading
Loading
Loading
+25 −8
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ func (mt *librarySdkMemberType) organizeVariants(member android.SdkMember) *nati
			name:                         memberName,
			archType:                     ccModule.Target().Arch.ArchType.String(),
			ExportedIncludeDirs:          exportedIncludeDirs,
			ExportedGeneratedIncludeDirs: exportedGeneratedIncludeDirs,
			exportedGeneratedIncludeDirs: exportedGeneratedIncludeDirs,
			ExportedSystemIncludeDirs:    ccModule.ExportedSystemIncludeDirs(),
			ExportedFlags:                ccModule.ExportedFlags(),
			exportedGeneratedHeaders:     ccModule.ExportedGeneratedHeaders(),
@@ -200,7 +200,7 @@ func extractCommonProperties(commonProperties interface{}, inputPropertiesSlice
func buildSharedNativeLibSnapshot(sdkModuleContext android.ModuleContext, info *nativeLibInfo, builder android.SnapshotBuilder, member android.SdkMember) {
	// a function for emitting include dirs
	addExportedDirCopyCommandsForNativeLibs := func(lib nativeLibInfoProperties) {
		// Do not include ExportedGeneratedIncludeDirs in the list of directories whose
		// Do not include exportedGeneratedIncludeDirs in the list of directories whose
		// contents are copied as they are copied from exportedGeneratedHeaders below.
		includeDirs := lib.ExportedIncludeDirs
		includeDirs = append(includeDirs, lib.ExportedSystemIncludeDirs...)
@@ -296,7 +296,7 @@ func nativeIncludeDirPathsFor(lib nativeLibInfoProperties, systemInclude bool) [
	var includeDirs []android.Path
	if !systemInclude {
		// Include the generated include dirs in the exported include dirs.
		includeDirs = append(lib.ExportedIncludeDirs, lib.ExportedGeneratedIncludeDirs...)
		includeDirs = append(lib.ExportedIncludeDirs, lib.exportedGeneratedIncludeDirs...)
	} else {
		includeDirs = lib.ExportedSystemIncludeDirs
	}
@@ -327,14 +327,31 @@ type nativeLibInfoProperties struct {
	// This is "" for common properties.
	archType string

	// The list of possibly common exported include dirs.
	//
	// This field is exported as its contents may not be arch specific.
	ExportedIncludeDirs android.Paths
	ExportedGeneratedIncludeDirs android.Paths
	ExportedSystemIncludeDirs    android.Paths
	ExportedFlags                []string

	// exportedGeneratedHeaders is not exported as if set it is always arch specific.
	// The list of arch specific exported generated include dirs.
	//
	// This field is not exported as its contents are always arch specific.
	exportedGeneratedIncludeDirs android.Paths

	// The list of arch specific exported generated header files.
	//
	// This field is not exported as its contents are is always arch specific.
	exportedGeneratedHeaders android.Paths

	// The list of possibly common exported system include dirs.
	//
	// This field is exported as its contents may not be arch specific.
	ExportedSystemIncludeDirs android.Paths

	// The list of possibly common exported flags.
	//
	// This field is exported as its contents may not be arch specific.
	ExportedFlags []string

	// outputFile is not exported as it is always arch specific.
	outputFile android.Path
}