diff options
Diffstat (limited to 'android/paths.go')
-rw-r--r-- | android/paths.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/android/paths.go b/android/paths.go index e7829b961..d5cec9af7 100644 --- a/android/paths.go +++ b/android/paths.go @@ -1057,7 +1057,8 @@ func safePathForSource(ctx PathContext, pathComponents ...string) (SourcePath, e } // absolute path already checked by validateSafePath - if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) { + // special-case api surface gen files for now + if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) && !strings.Contains(ret.String(), ctx.Config().soongOutDir+"/.export") { return ret, fmt.Errorf("source path %q is in output", ret.String()) } @@ -1073,7 +1074,8 @@ func pathForSource(ctx PathContext, pathComponents ...string) (SourcePath, error } // absolute path already checked by validatePath - if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) { + // special-case for now + if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) && !strings.Contains(ret.String(), ctx.Config().soongOutDir+"/.export") { return ret, fmt.Errorf("source path %q is in output", ret.String()) } @@ -1737,10 +1739,16 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, partionPaths = []string{"target", "product", ctx.Config().DeviceName(), partition} } else { osName := os.String() - if os == Linux || os == LinuxMusl { + if os == Linux { // instead of linux_glibc osName = "linux" } + if os == LinuxMusl && ctx.Config().UseHostMusl() { + // When using musl instead of glibc, use "linux" instead of "linux_musl". When cross + // compiling we will still use "linux_musl". + osName = "linux" + } + // SOONG_HOST_OUT is set to out/host/$(HOST_OS)-$(HOST_PREBUILT_ARCH) // and HOST_PREBUILT_ARCH is forcibly set to x86 even on x86_64 hosts. We don't seem // to have a plan to fix it (see the comment in build/make/core/envsetup.mk). |