diff --git a/android/arch.go b/android/arch.go
index 583793e..7ca7336 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -255,7 +255,7 @@
 // Linux returns true if the OS uses the Linux kernel, i.e. if the OS is Android or is Linux
 // with or without the Bionic libc runtime.
 func (os OsType) Linux() bool {
-	return os == Android || os == Linux || os == LinuxBionic
+	return os == Android || os == Linux || os == LinuxBionic || os == LinuxMusl
 }
 
 // newOsType constructs an OsType and adds it to the global lists.
@@ -305,6 +305,8 @@
 	NoOsType OsType
 	// 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)
 	// Darwin is the OS for MacOS/Darwin host machines.
 	Darwin = newOsType("darwin", Host, false, X86_64)
 	// LinuxBionic is the OS for the Linux kernel plus the Bionic libc runtime, but without the
@@ -863,6 +865,8 @@
 			"Android64",
 			"Android32",
 			"Bionic",
+			"Glibc",
+			"Musl",
 			"Linux",
 			"Not_windows",
 			"Arm_on_x86",
@@ -1108,6 +1112,30 @@
 				}
 			}
 
+			if os == Linux {
+				field := "Glibc"
+				prefix := "target.glibc"
+				if bionicProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok {
+					mergePropertyStruct(ctx, genProps, bionicProperties)
+				}
+			}
+
+			if os == LinuxMusl {
+				field := "Musl"
+				prefix := "target.musl"
+				if bionicProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok {
+					mergePropertyStruct(ctx, genProps, bionicProperties)
+				}
+
+				// Special case:  to ease the transition from glibc to musl, apply linux_glibc
+				// properties (which has historically mean host linux) to musl variants.
+				field = "Linux_glibc"
+				prefix = "target.linux_glibc"
+				if bionicProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok {
+					mergePropertyStruct(ctx, genProps, bionicProperties)
+				}
+			}
+
 			// Handle target OS properties in the form:
 			// target: {
 			//     linux_glibc: {
@@ -1310,6 +1338,16 @@
 		if osArchProperties, ok := getChildPropertyStruct(ctx, targetProp, field, userFriendlyField); ok {
 			result = append(result, osArchProperties)
 		}
+
+		if os == LinuxMusl {
+			// Special case:  to ease the transition from glibc to musl, apply linux_glibc
+			// properties (which has historically mean host linux) to musl variants.
+			field := "Linux_glibc_" + archType.Name
+			userFriendlyField := "target.linux_glibc_" + archType.Name
+			if osArchProperties, ok := getChildPropertyStruct(ctx, targetProp, field, userFriendlyField); ok {
+				result = append(result, osArchProperties)
+			}
+		}
 	}
 
 	// Handle arm on x86 properties in the form:
@@ -1375,11 +1413,14 @@
 }
 
 // determineBuildOS stores the OS and architecture used for host targets used during the build into
-// config based on the runtime OS and architecture determined by Go.
+// config based on the runtime OS and architecture determined by Go and the product configuration.
 func determineBuildOS(config *config) {
 	config.BuildOS = func() OsType {
 		switch runtime.GOOS {
 		case "linux":
+			if Bool(config.productVariables.HostMusl) {
+				return LinuxMusl
+			}
 			return Linux
 		case "darwin":
 			return Darwin
diff --git a/android/arch_test.go b/android/arch_test.go
index 2a2fd45..a828321 100644
--- a/android/arch_test.go
+++ b/android/arch_test.go
@@ -508,9 +508,12 @@
 				bionic: { a:  ["bionic"] },
 				host: { a: ["host"] },
 				android: { a:  ["android"] },
+				glibc: { a:  ["glibc"] },
+				musl: { a:  ["musl"] },
 				linux_bionic: { a:  ["linux_bionic"] },
 				linux: { a:  ["linux"] },
 				linux_glibc: { a:  ["linux_glibc"] },
+				linux_musl: { a:  ["linux_musl"] },
 				windows: { a:  ["windows"], enabled: true },
 				darwin: { a:  ["darwin"] },
 				not_windows: { a:  ["not_windows"] },
@@ -522,6 +525,8 @@
 				linux_x86_64: { a:  ["linux_x86_64"] },
 				linux_glibc_x86: { a:  ["linux_glibc_x86"] },
 				linux_glibc_x86_64: { a:  ["linux_glibc_x86_64"] },
+				linux_musl_x86: { a:  ["linux_musl_x86"] },
+				linux_musl_x86_64: { a:  ["linux_musl_x86_64"] },
 				darwin_x86_64: { a:  ["darwin_x86_64"] },
 				windows_x86: { a:  ["windows_x86"] },
 				windows_x86_64: { a:  ["windows_x86_64"] },
@@ -563,12 +568,12 @@
 				{
 					module:   "foo",
 					variant:  "linux_glibc_x86_64",
-					property: []string{"root", "host", "linux", "linux_glibc", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_glibc_x86_64"},
+					property: []string{"root", "host", "linux", "glibc", "linux_glibc", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_glibc_x86_64"},
 				},
 				{
 					module:   "foo",
 					variant:  "linux_glibc_x86",
-					property: []string{"root", "host", "linux", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"},
+					property: []string{"root", "host", "linux", "glibc", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"},
 				},
 			},
 		},
@@ -595,6 +600,23 @@
 			},
 		},
 		{
+			name:     "linux_musl",
+			goOS:     "linux",
+			preparer: FixtureModifyConfig(modifyTestConfigForMusl),
+			results: []result{
+				{
+					module:   "foo",
+					variant:  "linux_musl_x86_64",
+					property: []string{"root", "host", "linux", "musl", "linux_glibc", "linux_musl", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_musl_x86_64", "linux_glibc_x86_64"},
+				},
+				{
+					module:   "foo",
+					variant:  "linux_musl_x86",
+					property: []string{"root", "host", "linux", "musl", "linux_glibc", "linux_musl", "not_windows", "x86", "lib32", "linux_x86", "linux_musl_x86", "linux_glibc_x86"},
+				},
+			},
+		},
+		{
 			name: "darwin",
 			goOS: "darwin",
 			results: []result{
diff --git a/android/config.go b/android/config.go
index 871986c..9addf5d 100644
--- a/android/config.go
+++ b/android/config.go
@@ -362,6 +362,19 @@
 	config.TestProductVariables.DeviceSecondaryArchVariant = proptools.StringPtr("armv7-a-neon")
 }
 
+func modifyTestConfigForMusl(config Config) {
+	delete(config.Targets, config.BuildOS)
+	config.productVariables.HostMusl = boolPtr(true)
+	determineBuildOS(config.config)
+	config.Targets[config.BuildOS] = []Target{
+		{config.BuildOS, Arch{ArchType: X86_64}, NativeBridgeDisabled, "", "", false},
+		{config.BuildOS, Arch{ArchType: X86}, NativeBridgeDisabled, "", "", false},
+	}
+
+	config.BuildOSTarget = config.Targets[config.BuildOS][0]
+	config.BuildOSCommonTarget = getCommonTargets(config.Targets[config.BuildOS])[0]
+}
+
 // TestArchConfig returns a Config object suitable for using for tests that
 // need to run the arch mutator.
 func TestArchConfig(buildDir string, env map[string]string, bp string, fs map[string][]byte) Config {
diff --git a/android/paths.go b/android/paths.go
index bec8a51..99db22f 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1667,7 +1667,7 @@
 		partionPaths = []string{"target", "product", ctx.Config().DeviceName(), partition}
 	} else {
 		osName := os.String()
-		if os == Linux {
+		if os == Linux || os == LinuxMusl {
 			// instead of linux_glibc
 			osName = "linux"
 		}
diff --git a/android/variable.go b/android/variable.go
index d0a23aa..d32debe 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -203,6 +203,7 @@
 
 	HostArch          *string `json:",omitempty"`
 	HostSecondaryArch *string `json:",omitempty"`
+	HostMusl          *bool   `json:",omitempty"`
 
 	CrossHost              *string `json:",omitempty"`
 	CrossHostArch          *string `json:",omitempty"`
