diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-04-04 06:07:09 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-04-04 06:07:09 -0400 |
| commit | 8db9d04e6f89a17f17e369a1a2582bdb8db50843 (patch) | |
| tree | a3551c179f7349a9801e77352a5b5ab6eeed143e /src | |
| parent | e332cd65c95472c0e06bfc6a2cccf17c36ee4606 (diff) | |
| download | zig-8db9d04e6f89a17f17e369a1a2582bdb8db50843.tar.gz zig-8db9d04e6f89a17f17e369a1a2582bdb8db50843.zip | |
link: fix ignoring first linker arg
LLD treats the first argument as arg[0], the exe name
Diffstat (limited to 'src')
| -rw-r--r-- | src/link.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/link.cpp b/src/link.cpp index 390354a85a..99effec3e5 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -736,6 +736,11 @@ static void construct_linker_job(LinkJob *lj) { void codegen_link(CodeGen *g, const char *out_file) { LinkJob lj = {0}; + + // even though we're calling LLD as a library it thinks the first + // argument is its own exe name + lj.args.append("lld"); + lj.rpath_table.init(4); lj.codegen = g; if (out_file) { |
