nativeGen: Disable asm-shortcutting on Darwin
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).