Skip to content

rdynamic = true has no effect on Mach-O ld linker #17554

@slomp

Description

@slomp

Zig Version

0.11.0

Steps to Reproduce and Observed Behavior

zig init-exe

then add the following to build.zig:

exe.rdynamic = true;

and get the verbose linker command line:

zig build --verbose-link

Observed behavior: -export_dynamic is nowhere to be seen in the ld command line.

FWIW, I found this old PR that states: "(right now ZigLLVM_MachO sends -export_dynamic ..."
#4835

Expected Behavior

Expected to see -export_dynamic passed to ld in the command line.
(Note that the Mach-O ld linker option uses "single-dash and underscore", as opposed to GNU's "double-dash and hyphen", i.e., -export_dynamic, as opposed to --export-dynamic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorlinkingos-macos

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions