depot/third_party/nixpkgs/pkgs/development/compilers/ponyc/fix-darwin-build.patch
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

22 lines
749 B
Diff

diff --git a/src/libponyc/codegen/genexe.c b/src/libponyc/codegen/genexe.c
index 42a68251..b37958ab 100644
--- a/src/libponyc/codegen/genexe.c
+++ b/src/libponyc/codegen/genexe.c
@@ -296,13 +296,13 @@ static bool link_exe(compile_t* c, ast_t* program,
snprintf(ld_cmd, ld_len,
#if defined(PLATFORM_IS_ARM)
- "%s -execute -arch %.*s "
+ "%s -execute "
#else
- "%s -execute -no_pie -arch %.*s "
+ "%s -execute -no_pie "
#endif
"-o %s %s %s %s "
- "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem %s",
- linker, (int)arch_len, c->opt->triple, file_exe, file_o,
+ "-L@libSystem@/lib -lSystem %s",
+ linker, file_exe, file_o,
lib_args, ponyrt, sanitizer_arg
);