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
This commit is contained in:
parent
d4a393466a
commit
21b9427380
|
@ -391,6 +391,7 @@ var (
|
|||
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 @@ var (
|
|||
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 @@ func decodeTargetProductVariables(config *config) (map[OsType][]Target, error) {
|
|||
}
|
||||
|
||||
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 != "" {
|
||||
|
|
|
@ -586,6 +586,10 @@ func (c *config) UnbundledBuildPrebuiltSdks() bool {
|
|||
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)
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ type androidBaseContext interface {
|
|||
Host() bool
|
||||
Device() bool
|
||||
Darwin() bool
|
||||
Fuchsia() bool
|
||||
Windows() bool
|
||||
Debug() bool
|
||||
PrimaryArch() bool
|
||||
|
@ -1121,6 +1122,10 @@ func (a *androidBaseContextImpl) Darwin() bool {
|
|||
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
|
||||
}
|
||||
|
|
|
@ -243,6 +243,8 @@ type productVariables struct {
|
|||
|
||||
Product_is_iot *bool `json:",omitempty"`
|
||||
|
||||
Fuchsia *bool `json:",omitempty"`
|
||||
|
||||
DeviceKernelHeaders []string `json:",omitempty"`
|
||||
|
||||
ExtraVndkVersions []string `json:",omitempty"`
|
||||
|
|
Loading…
Reference in New Issue