Files
Evan Wies 35a61ac8c5 compiler: support file-level //go:linkname directives
Modern golang.org/x/sys/unix (v0.36+) declares its linknames
detached from function declarations, e.g.:

    func syscall_syscall(...)
    //go:linkname syscall_syscall syscall.syscall

TinyGo's pragma parser only inspected function doc comments and
therefore missed these, producing link errors like:

    undefined symbol: _golang.org/x/sys/unix.syscall_syscall

Extend parsePragmas to also walk the enclosing *ast.File's
free-standing comments for //go:linkname directives matching the
function's name. Function-attached directives still take
precedence. The existing 'unsafe' import gate is preserved.

Fixes #4395, #5365
2026-07-12 11:54:38 +02:00
..
2026-05-25 16:58:01 +02:00
2026-05-25 16:58:01 +02:00
2021-04-12 12:07:42 +02:00
2026-05-25 16:58:01 +02:00
2026-04-05 14:14:55 +02:00
2026-05-25 16:58:01 +02:00
2026-05-25 16:58:01 +02:00
2026-05-25 16:58:01 +02:00
2026-05-25 16:58:01 +02:00