authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-10-09 12:46:22-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-10-09 13:16:51-04:00
loge0a94db65e24c756e5e91ac1dfafa5c85035eaee
tree83593ccc3b7d3d02ab3772af0b760115f8ee97f6
parent84690ee05ecb1ee03a98c8bb62ae70e88daf23cd
signature Commit is signed but in an unrecognized format.

fix error limit linker arg on windows


1 files changed, 6 insertions(+), 1 deletions(-)

src/link.cpp+6-1
......@@ -192,6 +192,8 @@ static Buf *get_dynamic_linker_path(CodeGen *g) {
192192static void construct_linker_job_elf(LinkJob *lj) {
193193 CodeGen *g = lj->codegen;
194194
195 lj->args.append("-error-limit=0");
196
195197 if (g->libc_link_lib != nullptr) {
196198 find_libc_lib_path(g);
197199 }
......@@ -381,6 +383,7 @@ static void construct_linker_job_elf(LinkJob *lj) {
381383static void construct_linker_job_wasm(LinkJob *lj) {
382384 CodeGen *g = lj->codegen;
383385
386 lj->args.append("-error-limit=0");
384387 lj->args.append("--no-entry"); // So lld doesn't look for _start.
385388 lj->args.append("-o");
386389 lj->args.append(buf_ptr(&g->output_file_path));
......@@ -419,6 +422,8 @@ static bool zig_lld_link(ZigLLVM_ObjectFormatType oformat, const char **args, si
419422static void construct_linker_job_coff(LinkJob *lj) {
420423 CodeGen *g = lj->codegen;
421424
425 lj->args.append("/ERRORLIMIT:0");
426
422427 if (g->libc_link_lib != nullptr) {
423428 find_libc_lib_path(g);
424429 }
......@@ -755,6 +760,7 @@ static bool darwin_version_lt(DarwinPlatform *platform, int major, int minor) {
755760static void construct_linker_job_macho(LinkJob *lj) {
756761 CodeGen *g = lj->codegen;
757762
763 lj->args.append("-error-limit=0");
758764 lj->args.append("-demangle");
759765
760766 if (g->linker_rdynamic) {
......@@ -969,7 +975,6 @@ void codegen_link(CodeGen *g) {
969975
970976 lj.link_in_crt = (g->libc_link_lib != nullptr && g->out_type == OutTypeExe);
971977
972 lj.args.append("-error-limit=0");
973978 construct_linker_job(&lj);
974979
975980