| ... | @@ -736,6 +736,11 @@ static void construct_linker_job(LinkJob *lj) { | ... | @@ -736,6 +736,11 @@ static void construct_linker_job(LinkJob *lj) { |
| 736 | | 736 | |
| 737 | void codegen_link(CodeGen *g, const char *out_file) { | 737 | void codegen_link(CodeGen *g, const char *out_file) { |
| 738 | LinkJob lj = {0}; | 738 | 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 | |
| 739 | lj.rpath_table.init(4); | 744 | lj.rpath_table.init(4); |
| 740 | lj.codegen = g; | 745 | lj.codegen = g; |
| 741 | if (out_file) { | 746 | if (out_file) { |