From 94e04c42e00da1b9e01ff03acaa4d06f1f48c4cb Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Mon, 12 May 2025 12:18:18 -0400 Subject: [PATCH] Don't compile assembly with `nasm` on non-x86 platforms --- src/linker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linker.cpp b/src/linker.cpp index ec165ef7d..d648326b5 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -532,7 +532,7 @@ try_cross_linking:; LIT(build_context.metrics.target_triplet), LIT(build_context.extra_assembler_flags) ); - } else if (is_osx) { + } else if (is_osx || !is_arch_x86()) { // `as` comes with MacOS. result = system_exec_command_line_app("as", "as \"%.*s\" " @@ -544,6 +544,7 @@ try_cross_linking:; LIT(build_context.extra_assembler_flags) ); } else { + // `nasm` only compiles x86 assembly. // Note(bumbread): I'm assuming nasm is installed on the host machine. // Shipping binaries on unix-likes gets into the weird territorry of // "which version of glibc" is it linked with.