Skip to content

Commit 1227576

Browse files
committed
skip internal linking
1 parent 8bd9fd4 commit 1227576

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

patches/0006-Add-Darwin-crypto-backend.patch

+27-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Subject: [PATCH] Add Darwin crypto backend
55

66
---
77
.gitignore | 2 +
8+
src/cmd/dist/test.go | 7 +-
89
src/cmd/go/go_boring_test.go | 9 +-
910
src/cmd/go/testdata/script/darwin_no_cgo.txt | 2 +
1011
src/crypto/ecdsa/ecdsa.go | 6 +-
@@ -26,7 +27,7 @@ Subject: [PATCH] Add Darwin crypto backend
2627
src/internal/goexperiment/flags.go | 1 +
2728
src/net/lookup_test.go | 3 +
2829
src/runtime/pprof/vminfo_darwin_test.go | 6 +
29-
22 files changed, 523 insertions(+), 14 deletions(-)
30+
23 files changed, 529 insertions(+), 15 deletions(-)
3031
create mode 100644 src/crypto/internal/backend/bbig/big_darwin.go
3132
create mode 100644 src/crypto/internal/backend/darwin_darwin.go
3233
create mode 100644 src/crypto/internal/backend/fips140/darwin.go
@@ -47,6 +48,31 @@ index c6512e64a4ef39..b3b01db73b009d 100644
4748
# This file includes artifacts of Go build that should not be checked in.
4849
# For files created by specific development environment (e.g. editor),
4950
# 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
5076
diff --git a/src/cmd/go/go_boring_test.go b/src/cmd/go/go_boring_test.go
5177
index 06478963f4be44..8111b143a1295b 100644
5278
--- a/src/cmd/go/go_boring_test.go

0 commit comments

Comments
 (0)