Fix lld-link LTO jobs flag syntax on Windows

lld-link doesn't recognize /lldltojobs:N as a standalone flag and
treats it as a file path. Use /opt:lldltojobs=N instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jesse Meyer
2026-02-02 15:23:06 -05:00
parent 9eba12948a
commit a0562dfd6e

View File

@@ -331,7 +331,7 @@ try_cross_linking:;
gbString lld_lto_flags = gb_string_make(heap_allocator(), "");
defer (gb_string_free(lld_lto_flags));
if (build_context.lto_kind != LTO_None) {
lld_lto_flags = gb_string_append_fmt(lld_lto_flags, "/lldltojobs:%d ", build_context.thread_count);
lld_lto_flags = gb_string_append_fmt(lld_lto_flags, "/opt:lldltojobs=%d ", build_context.thread_count);
}
switch (build_context.linker_choice) {