Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
--export-dynamic
not getting set via-rdynamic
in the ELF linker construction seems to have been a bug? Correct me if I'm wrong, or if-rdynamic
should be handled in any of the other linker formats (right nowZigLLVM_MachO
sends-export_dynamic
and with this PRZigLLVM_ELF
sends--export-dynamic
;ZigLLVM_Wasm
andZigLLVM_COFF
ignore-rdynamic
).-rdynamic
and-Wl,--export-dynamic
are essentially the same thing with regards to Zig. The difference in other compilers is that-rdynamic
doesn't set--export-dynamic
if it doesn't need to for the target? If so, it seems like Zig would probably want to treat the--export-dynamic
linker flag the same as-rdynamic
(hence why I made the--export-dynamic
linker flag setrdynamic = true
inzig cc
instead of adding a separateexport_dynamic
field).Contributes towards #4784
EDIT: