mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
internal/task, runtime: add subsections_via_symbols to assembly files on darwin
This allows the assembly routines in these files to be stripped as dead code if they're not referenced. This solves the link issues on MacOS when the `leaking` garbage collector or the `coroutines` scheduler are selected. Fixes #2081
This commit is contained in:
@@ -72,3 +72,8 @@ tinygo_swapTask:
|
||||
|
||||
// Return into the new task, as if tinygo_swapTask was a regular call.
|
||||
ret
|
||||
|
||||
#ifdef __MACH__ // Darwin
|
||||
// allow these symbols to stripped as dead code
|
||||
.subsections_via_symbols
|
||||
#endif
|
||||
|
||||
@@ -27,3 +27,8 @@ _tinygo_scanCurrentStack:
|
||||
// were only pushed to be discoverable by the GC.
|
||||
addq $56, %rsp
|
||||
retq
|
||||
|
||||
#ifdef __MACH__ // Darwin
|
||||
// allow these symbols to stripped as dead code
|
||||
.subsections_via_symbols
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user