Skip to content

nativeGen: Disable asm-shortcutting on Darwin

Ben Gamari requested to merge wip/T21972 into master

Asm-shortcutting may produce relative references to symbols defined in other compilation units. This is not something that MachO relocations support (see #21972 (closed)). For this reason we disable the optimisation on Darwin. We do so without a warning since this flag is enabled by -O2.

Another way to address this issue would be to rather implement a PLT-relocatable jump-table strategy. However, this would only benefit Darwin and does not seem worth the effort.

Closes #21972 (closed).

Merge request reports