]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
macOS: Workaround for buggy XCode 15.0 - 15.2 linker.
authorMike Pall <mike>
Wed, 2 Oct 2024 10:12:56 +0000 (12:12 +0200)
committerMike Pall <mike>
Wed, 2 Oct 2024 10:12:56 +0000 (12:12 +0200)
Thanks to Carlo Cabrera. #1283

src/host/buildvm_asm.c

index e7c5de708a45f767a6a2b8ac133794206d47a34e..1b261206a8751839edeb7694234379d74925feaa 100644 (file)
@@ -339,6 +339,10 @@ void emit_asm(BuildCtx *ctx)
     fprintf(ctx->fp, "\t.ident \"%s\"\n", ctx->dasm_ident);
     break;
   case BUILD_machasm:
+#if defined(__apple_build_version__) && __apple_build_version__ >= 15000000 && __apple_build_version__ < 15000300
+    /* Workaround for XCode 15.0 - 15.2. */
+    fprintf(ctx->fp, "\t.subsections_via_symbols\n");
+#endif
     fprintf(ctx->fp,
       "\t.cstring\n"
       "\t.ascii \"%s\\0\"\n", ctx->dasm_ident);