Add a nice install paths for module SDKs and exports.
Following how NDK also creates its own install path. Bug: 142935992 Test: cc_sdk_test.go, java_sdk_test.go Change-Id: I98a3656903f37f6d7c90e6cf609431b2461a6161
This commit is contained in:
@@ -1276,8 +1276,8 @@ func pathForInstall(ctx PathContext, os OsType, partition string, debug bool,
|
||||
return ret
|
||||
}
|
||||
|
||||
func PathForNdkInstall(ctx PathContext, paths ...string) InstallPath {
|
||||
paths = append([]string{"ndk"}, paths...)
|
||||
func pathForNdkOrSdkInstall(ctx PathContext, prefix string, paths []string) InstallPath {
|
||||
paths = append([]string{prefix}, paths...)
|
||||
path, err := validatePath(paths...)
|
||||
if err != nil {
|
||||
reportPathError(ctx, err)
|
||||
@@ -1285,6 +1285,14 @@ func PathForNdkInstall(ctx PathContext, paths ...string) InstallPath {
|
||||
return InstallPath{basePath{path, ctx.Config(), ""}, ""}
|
||||
}
|
||||
|
||||
func PathForNdkInstall(ctx PathContext, paths ...string) InstallPath {
|
||||
return pathForNdkOrSdkInstall(ctx, "ndk", paths)
|
||||
}
|
||||
|
||||
func PathForMainlineSdksInstall(ctx PathContext, paths ...string) InstallPath {
|
||||
return pathForNdkOrSdkInstall(ctx, "mainline-sdks", paths)
|
||||
}
|
||||
|
||||
func InstallPathToOnDevicePath(ctx PathContext, path InstallPath) string {
|
||||
rel := Rel(ctx, PathForOutput(ctx, "target", "product", ctx.Config().DeviceName()).String(), path.String())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user