Merge "Change remaining properties to *string, *bool in Soong." am: bafc47aea6 am: 0791bbf4ca

am: b84d38dc2e

Change-Id: Ic349292370b44b0ccc35b74e0af5e3d673458147
This commit is contained in:
Nan Zhang 2017-11-14 11:31:49 +00:00 committed by android-build-merger
commit b2bc27a53d
2 changed files with 11 additions and 11 deletions

View file

@ -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)

View file

@ -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__/<the value of ${out}>"
@ -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 {