From 9ff3db46c280fb7b6090b9ea14edece39d577370 Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Fri, 9 Apr 2021 13:28:12 -0700 Subject: Allow Soongs/blueprint's microfactory build starlark-go Change build directives to avoids additional external dependency (golang.org/x/sys/unix) at the cost of small performance degradation when handling integers. Bug: 172923994 Test: treehugger Change-Id: I11aa727031a523a309ba9372300e6d413847e02d --- starlark/int_generic.go | 5 +++-- starlark/int_posix64.go | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/starlark/int_generic.go b/starlark/int_generic.go index 9e84d7f..8eed77d 100644 --- a/starlark/int_generic.go +++ b/starlark/int_generic.go @@ -1,5 +1,6 @@ -//+build !linux,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris darwin,arm64 !amd64,!arm64,!mips64x,!ppc64x - +// Always use this implementation, even for Posix-compliant platforms +// (upstream code uses the implementation in int_posix64.go, but we +// do not want to depend on golang.olg/x.sys/unix package). package starlark // generic Int implementation as a union diff --git a/starlark/int_posix64.go b/starlark/int_posix64.go index 1f13d66..2c49d94 100644 --- a/starlark/int_posix64.go +++ b/starlark/int_posix64.go @@ -1,5 +1,6 @@ -//+build linux darwin dragonfly freebsd netbsd openbsd solaris -//+build amd64 arm64,!darwin mips64x ppc64x +// For the android builds, ignore this file to avoid dependency +// on yet another package (golang.org/x/sys/unix) +//+build ignore package starlark -- cgit v1.2.3