authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-04-04 06:07:09-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-04-04 06:07:09-04:00
log8db9d04e6f89a17f17e369a1a2582bdb8db50843
treea3551c179f7349a9801e77352a5b5ab6eeed143e
parente332cd65c95472c0e06bfc6a2cccf17c36ee4606

link: fix ignoring first linker arg

LLD treats the first argument as arg[0], the exe name

1 files changed, 5 insertions(+), 0 deletions(-)

src/link.cpp+5
......@@ -736,6 +736,11 @@ static void construct_linker_job(LinkJob *lj) {
736736
737737void codegen_link(CodeGen *g, const char *out_file) {
738738 LinkJob lj = {0};
739
740 // even though we're calling LLD as a library it thinks the first
741 // argument is its own exe name
742 lj.args.append("lld");
743
739744 lj.rpath_table.init(4);
740745 lj.codegen = g;
741746 if (out_file) {