Skip to content

__zig_probe_stack undefined in static libraries #6817

@jedisct1

Description

@jedisct1

When building static libraries, the __zig_probe_stack symbol is undefined:

Undefined symbols for architecture x86_64:
  "___zig_probe_stack", referenced from:
      _std.debug.printLineInfo in x.o)
      _std.sort.sort in x.o)
ld: symbol(s) not found for architecture x86_64

Passing -fno-stack-check fixes this (thanks @FireFox317 !), but maybe stack checking should be disabled automatically when building static libraries. Or maybe we want to link compile_rt?

What would be the best way to improve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions