diff options
author | Bryan C. Mills <bcmills@google.com> | 2023-02-01 12:33:11 -0500 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-02-01 19:47:35 +0000 |
commit | ab0f0459da302a2c81c4c11a7b9b4387c15a7aa0 (patch) | |
tree | bb0abbb925beb5d39627486f9237d27458d670b2 /misc | |
parent | 6224db9b4d6acbc04a357ef0505424d74b723233 (diff) | |
download | go-git-ab0f0459da302a2c81c4c11a7b9b4387c15a7aa0.tar.gz |
cmd/dist,internal/platform: reenable the c-archive build mode on ios
Also fix misc/cgo/testcarchive to provide a missing CoreFoundation
dependency at link time.
Fixes #58221.
Updates #58172.
Updates #58225.
Change-Id: Ib8b6e52ed2914596615da4c427df2fe984722de6
Reviewed-on: https://go-review.googlesource.com/c/go/+/463752
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/testcarchive/carchive_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/misc/cgo/testcarchive/carchive_test.go b/misc/cgo/testcarchive/carchive_test.go index 30e12be6c6..8a39c24a6d 100644 --- a/misc/cgo/testcarchive/carchive_test.go +++ b/misc/cgo/testcarchive/carchive_test.go @@ -132,6 +132,15 @@ func testMain(m *testing.M) int { // in .text section. cc = append(cc, "-Wl,-bnoobjreorder") } + if GOOS == "ios" { + // Linking runtime/cgo on ios requires the CoreFoundation framework because + // x_cgo_init uses CoreFoundation APIs to switch directory to the app root. + // + // TODO(#58225): This special case probably should not be needed. + // runtime/cgo is a very low-level package, and should not provide + // high-level behaviors like changing the current working directory at init. + cc = append(cc, "-framework", "CoreFoundation") + } libbase := GOOS + "_" + GOARCH if runtime.Compiler == "gccgo" { libbase = "gccgo_" + libgodir + "_fPIC" |