Separate InstallPath from OutputPath

Create a new type InstallPath that is similar to OutputPath to
differentiate intermediates output paths from installed output
paths.

RelPathString is a poorly defined, undocumented function that is
primarily used to get an install path relative to out/soong to
generate an equivalent install path for Make relative to $(OUT_DIR).
Move it to InstallPath for now, and fix the one remaining user on
OutputPath.

Add a method to create an NDK install path so that ndk_sysroot.go
doesn't have to do it manually with PathForOutput.

Bug: 141877526
Test: m checkbuild
Change-Id: I83c5a0bd1fd6c3dba8d3b6d20d039f64f353ddd5
This commit is contained in:
Colin Cross
2019-10-01 22:05:35 -07:00
parent 90ba5f4e98
commit 70dda7e3da
16 changed files with 91 additions and 53 deletions

View File

@@ -65,7 +65,7 @@ type PrebuiltEtc struct {
installDirBase string
// The base install location when soc_specific property is set to true, e.g. "firmware" for prebuilt_firmware.
socInstallDirBase string
installDirPath OutputPath
installDirPath InstallPath
additionalDependencies *Paths
}
@@ -91,7 +91,7 @@ func (p *PrebuiltEtc) SourceFilePath(ctx ModuleContext) Path {
return PathForModuleSrc(ctx, String(p.properties.Src))
}
func (p *PrebuiltEtc) InstallDirPath() OutputPath {
func (p *PrebuiltEtc) InstallDirPath() InstallPath {
return p.installDirPath
}