@@ -5,6 +5,7 @@ Subject: [PATCH] Add Darwin crypto backend
5
5
6
6
---
7
7
.gitignore | 2 +
8
+ src/cmd/dist/test.go | 7 +-
8
9
src/cmd/go/go_boring_test.go | 9 +-
9
10
src/cmd/go/testdata/script/darwin_no_cgo.txt | 2 +
10
11
src/crypto/ecdsa/ecdsa.go | 6 +-
@@ -26,7 +27,7 @@ Subject: [PATCH] Add Darwin crypto backend
26
27
src/internal/goexperiment/flags.go | 1 +
27
28
src/net/lookup_test.go | 3 +
28
29
src/runtime/pprof/vminfo_darwin_test.go | 6 +
29
- 22 files changed, 523 insertions(+), 14 deletions(-)
30
+ 23 files changed, 529 insertions(+), 15 deletions(-)
30
31
create mode 100644 src/crypto/internal/backend/bbig/big_darwin.go
31
32
create mode 100644 src/crypto/internal/backend/darwin_darwin.go
32
33
create mode 100644 src/crypto/internal/backend/fips140/darwin.go
@@ -47,6 +48,31 @@ index c6512e64a4ef39..b3b01db73b009d 100644
47
48
# This file includes artifacts of Go build that should not be checked in.
48
49
# For files created by specific development environment (e.g. editor),
49
50
# use alternative ways to exclude files from git.
51
+ diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
52
+ index 0de6e80fd985a3..783632120eada8 100644
53
+ --- a/src/cmd/dist/test.go
54
+ +++ b/src/cmd/dist/test.go
55
+ @@ -876,7 +876,7 @@ func (t *tester) registerTests() {
56
+ }
57
+
58
+ if t.extLink() && !t.compileOnly {
59
+ - if goos != "android" { // Android does not support non-PIE linking
60
+ + if goos != "android" && !(goos == "darwin" && (strings.Contains(goexperiment, "systemcrypto") || strings.Contains(goexperiment, "darwincrypto"))) { // Android does not support non-PIE linking
61
+ t.registerTest("external linking, -buildmode=exe",
62
+ &goTest{
63
+ variant: "exe_external",
64
+ @@ -1161,6 +1161,11 @@ func (t *tester) internalLink() bool {
65
+ if goos == "windows" && goarch == "arm64" {
66
+ return false
67
+ }
68
+ + if goos == "darwin" && (strings.Contains(goexperiment, "systemcrypto") || strings.Contains(goexperiment, "darwincrypto")) {
69
+ + // linkmode=internal isn't supported with system/darwin crypto.
70
+ + // see https://github.com/microsoft/go-crypto-darwin/issues/33
71
+ + return false
72
+ + }
73
+ // Internally linking cgo is incomplete on some architectures.
74
+ // https://golang.org/issue/10373
75
+ // https://golang.org/issue/14449
50
76
diff --git a/src/cmd/go/go_boring_test.go b/src/cmd/go/go_boring_test.go
51
77
index 06478963f4be44..8111b143a1295b 100644
52
78
--- a/src/cmd/go/go_boring_test.go
0 commit comments