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
Этот коммит содержится в:
родитель
eaab05fc43
коммит
32de906f6d
2 изменённых файлов: 10 добавлений и 0 удалений
|
@ -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
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче