Initial Fuchsia support.

This change adds Fuchsia as a valid OS. Future changes
will add proper toolchain support.

Bug: 119831161
Test: Compile walleye. Confirm that adding `fuchsia` to the
os-specific declaration of an arbitrary target does not throw
a build error.
Change-Id: I64eb928afb7512f3fbe32abb313b4c3efe16b169
diff --git a/android/arch.go b/android/arch.go
index 0180b87..bb8cc02 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -391,6 +391,7 @@
 	LinuxBionic = NewOsType("linux_bionic", Host, false)
 	Windows     = NewOsType("windows", HostCross, true)
 	Android     = NewOsType("android", Device, false)
+	Fuchsia     = NewOsType("fuchsia", Device, false)
 
 	osArchTypeMap = map[OsType][]ArchType{
 		Linux:       []ArchType{X86, X86_64},
@@ -398,6 +399,7 @@
 		Darwin:      []ArchType{X86_64},
 		Windows:     []ArchType{X86, X86_64},
 		Android:     []ArchType{Arm, Arm64, Mips, Mips64, X86, X86_64},
+		Fuchsia:     []ArchType{Arm64, X86_64},
 	}
 )
 
@@ -1191,7 +1193,12 @@
 	}
 
 	if variables.DeviceArch != nil && *variables.DeviceArch != "" {
-		addTarget(Android, *variables.DeviceArch, variables.DeviceArchVariant,
+		var target = Android
+		if Bool(variables.Fuchsia) {
+			target = Fuchsia
+		}
+
+		addTarget(target, *variables.DeviceArch, variables.DeviceArchVariant,
 			variables.DeviceCpuVariant, variables.DeviceAbi)
 
 		if variables.DeviceSecondaryArch != nil && *variables.DeviceSecondaryArch != "" {
diff --git a/android/config.go b/android/config.go
index 7c1278e..09d9cbc 100644
--- a/android/config.go
+++ b/android/config.go
@@ -586,6 +586,10 @@
 	return Bool(c.productVariables.Unbundled_build) && !Bool(c.productVariables.Unbundled_build_sdks_from_source)
 }
 
+func (c *config) Fuchsia() bool {
+	return Bool(c.productVariables.Fuchsia)
+}
+
 func (c *config) IsPdkBuild() bool {
 	return Bool(c.productVariables.Pdk)
 }
diff --git a/android/module.go b/android/module.go
index 303d8c6..aed16b3 100644
--- a/android/module.go
+++ b/android/module.go
@@ -64,6 +64,7 @@
 	Host() bool
 	Device() bool
 	Darwin() bool
+	Fuchsia() bool
 	Windows() bool
 	Debug() bool
 	PrimaryArch() bool
@@ -1121,6 +1122,10 @@
 	return a.target.Os == Darwin
 }
 
+func (a *androidBaseContextImpl) Fuchsia() bool {
+	return a.target.Os == Fuchsia
+}
+
 func (a *androidBaseContextImpl) Windows() bool {
 	return a.target.Os == Windows
 }
diff --git a/android/variable.go b/android/variable.go
index ddaf166..e19d858 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -243,6 +243,8 @@
 
 	Product_is_iot *bool `json:",omitempty"`
 
+	Fuchsia *bool `json:",omitempty"`
+
 	DeviceKernelHeaders []string `json:",omitempty"`
 
 	ExtraVndkVersions []string `json:",omitempty"`