darwin: replace custom syscall package with Go native syscall package

This required a few compiler and runtime tricks to work, but I ran a
bunch of tests and it seems fine. (CI will of course do more exhaustive
testing).

The main benefit here is that we don't need to maintain the darwin
version of the syscall package, and reduce extra risks for bugs (because
we reuse the well-tested syscall package). For example, Go 1.23 needed a
bunch of new constants in the syscall package. That would have been
avoided if we had used the native syscall package on MacOS.
This commit is contained in:
Ayke van Laethem
2024-08-18 19:33:04 +02:00
committed by Ron Evans
parent 753f4b38b4
commit 105fe9b25d
19 changed files with 229 additions and 531 deletions
+4 -6
View File
@@ -4,11 +4,9 @@ package abi
// (in particular internal/syscall/unix on MacOS). They do not currently have an
// implementation, in part because TinyGo doesn't use ABI0 or ABIInternal (it
// uses a C-like calling convention).
// Calls to FuncPCABI0 however are treated specially by the compiler when
// compiling for MacOS.
func FuncPCABI0(f interface{}) uintptr {
panic("unimplemented: internal/abi.FuncPCABI0")
}
func FuncPCABI0(f interface{}) uintptr
func FuncPCABIInternal(f interface{}) uintptr {
panic("unimplemented: internal/abi.FuncPCABIInternal")
}
func FuncPCABIInternal(f interface{}) uintptr