Change remaining properties to *string, *bool in Soong.
Test: m -j checkbuild
Bug: b/68853585
Change-Id: I0fd10ff31e90c1941e80cfbf25e40e9988f1e202
diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go
index 8f1ecbd..0458fb6 100644
--- a/cc/ndk_headers.go
+++ b/cc/ndk_headers.go
@@ -156,13 +156,13 @@
//
// 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) 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)
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 7602ee7..c5b7e1d 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -343,7 +343,7 @@
outFiles := android.WritablePaths{}
genPath := android.PathForModuleGen(ctx).String()
for _, in := range srcFiles {
- outFile := android.GenPathWithExt(ctx, "", in, properties.Output_extension)
+ outFile := android.GenPathWithExt(ctx, "", in, String(properties.Output_extension))
outFiles = append(outFiles, outFile)
// replace "out" with "__SBOX_OUT_DIR__/<the value of ${out}>"
@@ -390,7 +390,7 @@
type genSrcsProperties struct {
// extension that will be substituted for each output file
- Output_extension string
+ Output_extension *string
}
func NewGenRule() *Module {