diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go index 8f1ecbd6d..0458fb6c8 100644 --- a/cc/ndk_headers.go +++ b/cc/ndk_headers.go @@ -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) diff --git a/genrule/genrule.go b/genrule/genrule.go index 7602ee72b..c5b7e1d34 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -343,7 +343,7 @@ func NewGenSrcs() *Module { 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__/" @@ -390,7 +390,7 @@ func GenSrcsFactory() android.Module { type genSrcsProperties struct { // extension that will be substituted for each output file - Output_extension string + Output_extension *string } func NewGenRule() *Module {