Support building for Fuchsia.
This CL adds configs for the arm64 and x64 fuchsia
device targets, sets up the necessary linker flags,
and disables some functionality that is not currently
supported on Fuchsia.
Bug: 119831161
Test: Compile walleye, internal validation against
fuchsia_arm64-eng and fuchsia_x86_64-eng.
Change-Id: I2881b99d2e3a1995e2d8c00a2d86ee101a972c94
diff --git a/cc/cc.go b/cc/cc.go
index 5111bd2..ee6cd4e 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -599,7 +599,7 @@
}
func (ctx *moduleContextImpl) useSdk() bool {
- if ctx.ctx.Device() && !ctx.useVndk() && !ctx.inRecovery() {
+ if ctx.ctx.Device() && !ctx.useVndk() && !ctx.inRecovery() && !ctx.ctx.Fuchsia() {
return String(ctx.mod.Properties.Sdk_version) != ""
}
return false
@@ -668,6 +668,11 @@
if ctx.ctx.Config().IsEnvTrue("SKIP_ABI_CHECKS") {
return false
}
+
+ if ctx.ctx.Fuchsia() {
+ return false
+ }
+
if sanitize := ctx.mod.sanitize; sanitize != nil {
if !sanitize.isVariantOnProductionDevice() {
return false