aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-09-16 16:59:58 -0400
committerCherry Zhang <cherryyz@google.com>2020-09-23 18:12:59 +0000
commita413908dd064de6e3ea5b8d95d707a532bd3f4c8 (patch)
treeca1bb03a29fff2bb902aa015fe04fcd36988394d /src/crypto
parentbc320fc1f5bc5d6019e3d8d62aa32eac3417bb7f (diff)
downloadgo-a413908dd064de6e3ea5b8d95d707a532bd3f4c8.tar.gz
go-a413908dd064de6e3ea5b8d95d707a532bd3f4c8.zip
all: add GOOS=ios
Introduce GOOS=ios for iOS systems. GOOS=ios matches "darwin" build tag, like GOOS=android matches "linux" and GOOS=illumos matches "solaris". Only ios/arm64 is supported (ios/amd64 is not). GOOS=ios and GOOS=darwin remain essentially the same at this point. They will diverge at later time, to differentiate macOS and iOS. Uses of GOOS=="darwin" are changed to (GOOS=="darwin" || GOOS=="ios"), except if it clearly means macOS (e.g. GOOS=="darwin" && GOARCH=="amd64"), it remains GOOS=="darwin". Updates #38485. Change-Id: I4faacdc1008f42434599efb3c3ad90763a83b67c Reviewed-on: https://go-review.googlesource.com/c/go/+/254740 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/x509/root_darwin_ios_gen.go7
-rw-r--r--src/crypto/x509/root_darwin_iosx.go (renamed from src/crypto/x509/root_darwin_ios.go)0
2 files changed, 5 insertions, 2 deletions
diff --git a/src/crypto/x509/root_darwin_ios_gen.go b/src/crypto/x509/root_darwin_ios_gen.go
index 7a42466e5f..61152b4d11 100644
--- a/src/crypto/x509/root_darwin_ios_gen.go
+++ b/src/crypto/x509/root_darwin_ios_gen.go
@@ -4,7 +4,7 @@
// +build ignore
-// Generates root_darwin_ios.go.
+// Generates root_darwin_iosx.go.
//
// As of iOS 13, there is no API for querying the system trusted X.509 root
// certificates.
@@ -37,7 +37,10 @@ import (
)
func main() {
- var output = flag.String("output", "root_darwin_ios.go", "file name to write")
+ // Temporarily name the file _iosx.go, to avoid restricting it to GOOS=ios,
+ // as this is also used for darwin/arm64 (macOS).
+ // TODO: maybe use darwin/amd64 implementation on macOS arm64?
+ var output = flag.String("output", "root_darwin_iosx.go", "file name to write")
var version = flag.String("version", "", "security_certificates version")
flag.Parse()
if *version == "" {
diff --git a/src/crypto/x509/root_darwin_ios.go b/src/crypto/x509/root_darwin_iosx.go
index 5ecc4911b3..5ecc4911b3 100644
--- a/src/crypto/x509/root_darwin_ios.go
+++ b/src/crypto/x509/root_darwin_iosx.go