]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: only build xx_cgo_panicmem on iOS
authorCherry Zhang <cherryyz@google.com>
Sat, 3 Oct 2020 20:18:43 +0000 (16:18 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 6 Oct 2020 22:54:58 +0000 (22:54 +0000)
On iOS, when running under lldb, we install xx_cgo_panicmem as
EXC_BAD_ACCESS handler so we can get a proper Go panic for
SIGSEGV. Only build it on iOS.

Updates #38485.

Change-Id: I801c477439e05920a4bb8fdf5eae6f4923ab8274
Reviewed-on: https://go-review.googlesource.com/c/go/+/259440
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/cgo/gcc_signal2_ios_arm64.c [moved from src/runtime/cgo/gcc_signal2_darwin_arm64.c with 100% similarity]
src/runtime/cgo/gcc_signal_darwin_nolldb.c [moved from src/runtime/cgo/gcc_signal_darwin_lldb.c with 93% similarity]
src/runtime/cgo/gcc_signal_ios_arm64.c [moved from src/runtime/cgo/gcc_signal_darwin_arm64.c with 100% similarity]
src/runtime/cgo/signal_ios_arm64.go [moved from src/runtime/cgo/signal_darwin_arm64.go with 100% similarity]
src/runtime/cgo/signal_ios_arm64.s [moved from src/runtime/cgo/signal_darwin_arm64.s with 100% similarity]

similarity index 93%
rename from src/runtime/cgo/gcc_signal_darwin_lldb.c
rename to src/runtime/cgo/gcc_signal_darwin_nolldb.c
index 0ccdae324eae2f6c2f4b8861b9749619c92bf414..26be71bd1da9f9248fb46b301f0b15319df0a8f1 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !lldb
+// +build !lldb !ios
 // +build darwin
 // +build arm64