Change remaining properties to *string, *bool in Soong.
Test: m -j checkbuild Bug: b/68853585 Change-Id: I0fd10ff31e90c1941e80cfbf25e40e9988f1e202
This commit is contained in:
@@ -156,13 +156,13 @@ type preprocessedHeaderProperies struct {
|
||||
//
|
||||
// Will install $SYSROOT/usr/include/foo/bar/baz.h. If `from` were instead
|
||||
// "include/foo", it would have installed $SYSROOT/usr/include/bar/baz.h.
|
||||
From string
|
||||
From *string
|
||||
|
||||
// Install path within the sysroot. This is relative to usr/include.
|
||||
To string
|
||||
To *string
|
||||
|
||||
// Path to the NOTICE file associated with the headers.
|
||||
License string
|
||||
License *string
|
||||
}
|
||||
|
||||
// Like ndk_headers, but preprocesses the headers with the bionic versioner:
|
||||
@@ -185,25 +185,25 @@ func (m *preprocessedHeaderModule) DepsMutator(ctx android.BottomUpMutatorContex
|
||||
}
|
||||
|
||||
func (m *preprocessedHeaderModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
if m.properties.License == "" {
|
||||
if String(m.properties.License) == "" {
|
||||
ctx.PropertyErrorf("license", "field is required")
|
||||
}
|
||||
|
||||
m.licensePath = android.PathForModuleSrc(ctx, m.properties.License)
|
||||
m.licensePath = android.PathForModuleSrc(ctx, String(m.properties.License))
|
||||
|
||||
fromSrcPath := android.PathForModuleSrc(ctx, m.properties.From)
|
||||
toOutputPath := getCurrentIncludePath(ctx).Join(ctx, m.properties.To)
|
||||
fromSrcPath := android.PathForModuleSrc(ctx, String(m.properties.From))
|
||||
toOutputPath := getCurrentIncludePath(ctx).Join(ctx, String(m.properties.To))
|
||||
srcFiles := ctx.Glob(filepath.Join(fromSrcPath.String(), "**/*.h"), nil)
|
||||
var installPaths []android.WritablePath
|
||||
for _, header := range srcFiles {
|
||||
installDir := getHeaderInstallDir(ctx, header, m.properties.From, m.properties.To)
|
||||
installDir := getHeaderInstallDir(ctx, header, String(m.properties.From), String(m.properties.To))
|
||||
installPath := installDir.Join(ctx, header.Base())
|
||||
installPaths = append(installPaths, installPath)
|
||||
m.installPaths = append(m.installPaths, installPath.String())
|
||||
}
|
||||
|
||||
if len(m.installPaths) == 0 {
|
||||
ctx.ModuleErrorf("glob %q matched zero files", m.properties.From)
|
||||
ctx.ModuleErrorf("glob %q matched zero files", String(m.properties.From))
|
||||
}
|
||||
|
||||
processHeadersWithVersioner(ctx, fromSrcPath, toOutputPath, srcFiles, installPaths)
|
||||
|
Reference in New Issue
Block a user