aboutsummaryrefslogtreecommitdiff
path: root/cc/library_sdk_member.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-02-17 12:17:40 +0000
committerPaul Duffin <paulduffin@google.com>2021-02-22 18:23:22 +0000
commit7a7d067c741826ba8f735df863d3a7d0b1da1acf (patch)
treee0e8aa45c1862399cc52b76b6c0cb6867fb00a92 /cc/library_sdk_member.go
parent42dd4e6cd69026bf0537372772061d7bc2bc6f57 (diff)
downloadsoong-7a7d067c741826ba8f735df863d3a7d0b1da1acf.tar.gz
Generated headers may not be arch specific
Previously, it was assumed that generated headers must be arch specific and so prevented the fields referencing the paths to those headers from being automatically optimized by the sdk generation code. That is not always the case, e.g. with headers generated from protos so this change allows those fields to be optimized. Bug: 180427921 Test: m nothing Change-Id: Id2af419d58ae3c30ea6d9e87f71e33a9ff6ba13b
Diffstat (limited to 'cc/library_sdk_member.go')
-rw-r--r--cc/library_sdk_member.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index 14ff4d891..d5f2adf8b 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -206,22 +206,22 @@ var includeDirProperties = []includeDirsProperty{
dirs: true,
},
{
- // exportedGeneratedIncludeDirs lists directories that contains some header files
- // that are explicitly listed in the exportedGeneratedHeaders property. So, the contents
+ // ExportedGeneratedIncludeDirs lists directories that contains some header files
+ // that are explicitly listed in the ExportedGeneratedHeaders property. So, the contents
// of these directories do not need to be copied, but these directories do need adding to
// the export_include_dirs property in the prebuilt module in the snapshot.
- pathsGetter: func(libInfo *nativeLibInfoProperties) android.Paths { return libInfo.exportedGeneratedIncludeDirs },
+ pathsGetter: func(libInfo *nativeLibInfoProperties) android.Paths { return libInfo.ExportedGeneratedIncludeDirs },
propertyName: "export_include_dirs",
snapshotDir: nativeGeneratedIncludeDir,
copy: false,
dirs: true,
},
{
- // exportedGeneratedHeaders lists header files that are in one of the directories
- // specified in exportedGeneratedIncludeDirs must be copied into the snapshot.
- // As they are in a directory in exportedGeneratedIncludeDirs they do not need adding to a
+ // ExportedGeneratedHeaders lists header files that are in one of the directories
+ // specified in ExportedGeneratedIncludeDirs must be copied into the snapshot.
+ // As they are in a directory in ExportedGeneratedIncludeDirs they do not need adding to a
// property in the prebuilt module in the snapshot.
- pathsGetter: func(libInfo *nativeLibInfoProperties) android.Paths { return libInfo.exportedGeneratedHeaders },
+ pathsGetter: func(libInfo *nativeLibInfoProperties) android.Paths { return libInfo.ExportedGeneratedHeaders },
propertyName: "",
snapshotDir: nativeGeneratedIncludeDir,
copy: true,
@@ -351,13 +351,13 @@ type nativeLibInfoProperties struct {
// The list of arch specific exported generated include dirs.
//
- // This field is not exported as its contents are always arch specific.
- exportedGeneratedIncludeDirs android.Paths
+ // This field is exported as its contents may not be arch specific, e.g. protos.
+ ExportedGeneratedIncludeDirs android.Paths `android:"arch_variant"`
// 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
+ // This field is exported as its contents may not be arch specific, e.g. protos.
+ ExportedGeneratedHeaders android.Paths `android:"arch_variant"`
// The list of possibly common exported system include dirs.
//
@@ -430,7 +430,7 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte
// Make sure that the include directories are unique.
p.ExportedIncludeDirs = android.FirstUniquePaths(exportedIncludeDirs)
- p.exportedGeneratedIncludeDirs = android.FirstUniquePaths(exportedGeneratedIncludeDirs)
+ p.ExportedGeneratedIncludeDirs = android.FirstUniquePaths(exportedGeneratedIncludeDirs)
// Take a copy before filtering out duplicates to avoid changing the slice owned by the
// ccModule.
@@ -456,7 +456,7 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte
}
p.SystemSharedLibs = specifiedDeps.systemSharedLibs
}
- p.exportedGeneratedHeaders = exportedInfo.GeneratedHeaders
+ p.ExportedGeneratedHeaders = exportedInfo.GeneratedHeaders
if !p.memberType.noOutputFiles && addOutputFile {
p.outputFile = getRequiredMemberOutputFile(ctx, ccModule)