diff options
author | Ayke van Laethem <[email protected]> | 2024-11-07 14:38:31 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-11-20 18:50:34 +0100 |
commit | dd1ebbd31bd23474148686bd1d7a7298fe85038d (patch) | |
tree | fde74a680d8a6290291164d7fde201d459602d57 /compileopts/target.go | |
parent | 95671469c75cb56e7bdee9a061bc20114b4c2dc0 (diff) | |
download | tinygo-dd1ebbd31bd23474148686bd1d7a7298fe85038d.tar.gz tinygo-dd1ebbd31bd23474148686bd1d7a7298fe85038d.zip |
runtime: implement race-free signals using futexes
This requires an API introduced in MacOS 11. I think that's fine, since
the version before that (MacOS 10.15) is EOL since 2022. Though if
needed, we could certainly work around it by using an older and slightly
less nice API.
Diffstat (limited to 'compileopts/target.go')
-rw-r--r-- | compileopts/target.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compileopts/target.go b/compileopts/target.go index 3dc8af02f..f60ee3097 100644 --- a/compileopts/target.go +++ b/compileopts/target.go @@ -390,6 +390,7 @@ func defaultTarget(options *Options) (*TargetSpec, error) { "-platform_version", "macos", platformVersion, platformVersion, ) spec.ExtraFiles = append(spec.ExtraFiles, + "src/internal/futex/futex_darwin.c", "src/runtime/os_darwin.c", "src/runtime/runtime_unix.c", "src/runtime/signal.c") @@ -413,6 +414,7 @@ func defaultTarget(options *Options) (*TargetSpec, error) { spec.CFlags = append(spec.CFlags, "-mno-outline-atomics") } spec.ExtraFiles = append(spec.ExtraFiles, + "src/internal/futex/futex_linux.c", "src/runtime/runtime_unix.c", "src/runtime/signal.c") case "windows": |