Merge "Add linux_musl arm+arm64"

This commit is contained in:
Colin Cross
2022-06-27 18:37:07 +00:00
committed by Gerrit Code Review
8 changed files with 199 additions and 13 deletions

View File

@@ -307,7 +307,7 @@ var (
// Linux is the OS for the Linux kernel plus the glibc runtime.
Linux = newOsType("linux_glibc", Host, false, X86, X86_64)
// LinuxMusl is the OS for the Linux kernel plus the musl runtime.
LinuxMusl = newOsType("linux_musl", Host, false, X86, X86_64)
LinuxMusl = newOsType("linux_musl", Host, false, X86, X86_64, Arm64, Arm)
// Darwin is the OS for MacOS/Darwin host machines.
Darwin = newOsType("darwin", Host, false, Arm64, X86_64)
// LinuxBionic is the OS for the Linux kernel plus the Bionic libc runtime, but without the

View File

@@ -1739,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).