runtime: add support for os/signal

This adds support for enabling and listening to signals on Linux and
MacOS.
This commit is contained in:
Ayke van Laethem
2024-08-02 17:10:52 +02:00
committed by Ron Evans
parent 0f95b4102d
commit b8fe75a9dd
9 changed files with 374 additions and 19 deletions
+4 -2
View File
@@ -391,7 +391,8 @@ func defaultTarget(options *Options) (*TargetSpec, error) {
)
spec.ExtraFiles = append(spec.ExtraFiles,
"src/runtime/os_darwin.c",
"src/runtime/runtime_unix.c")
"src/runtime/runtime_unix.c",
"src/runtime/signal.c")
case "linux":
spec.Linker = "ld.lld"
spec.RTLib = "compiler-rt"
@@ -412,7 +413,8 @@ func defaultTarget(options *Options) (*TargetSpec, error) {
spec.CFlags = append(spec.CFlags, "-mno-outline-atomics")
}
spec.ExtraFiles = append(spec.ExtraFiles,
"src/runtime/runtime_unix.c")
"src/runtime/runtime_unix.c",
"src/runtime/signal.c")
case "windows":
spec.Linker = "ld.lld"
spec.Libc = "mingw-w64"