From c74ea4b77b45f0999e8b51f3d4d820caacde8873 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 16 Aug 2021 14:46:46 -0700 Subject: [PATCH] Support musl builds in Make Rewrite linux_musl to linux when exporting to Make. Bug: 190084016 Test: m USE_HOST_MUSL=true adb Change-Id: I48eed5bd7380a07c5106a9b2bd96899fb58f7a7f --- android/androidmk.go | 2 +- apex/androidmk.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/androidmk.go b/android/androidmk.go index f032f1bd4..9853d2cbe 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -571,7 +571,7 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint if host { makeOs := amod.Os().String() - if amod.Os() == Linux || amod.Os() == LinuxBionic { + if amod.Os() == Linux || amod.Os() == LinuxBionic || amod.Os() == LinuxMusl { makeOs = "linux" } a.SetString("LOCAL_MODULE_HOST_OS", makeOs) diff --git a/apex/androidmk.go b/apex/androidmk.go index ebf08330b..2f1090421 100644 --- a/apex/androidmk.go +++ b/apex/androidmk.go @@ -212,7 +212,7 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo } if host { makeOs := fi.module.Target().Os.String() - if fi.module.Target().Os == android.Linux || fi.module.Target().Os == android.LinuxBionic { + if fi.module.Target().Os == android.Linux || fi.module.Target().Os == android.LinuxBionic || fi.module.Target().Os == android.LinuxMusl { makeOs = "linux" } fmt.Fprintln(w, "LOCAL_MODULE_HOST_OS :=", makeOs)