diff options
| author | Ben Noordhuis <info@bnoordhuis.nl> | 2018-10-02 12:31:21 +0200 |
|---|---|---|
| committer | Ben Noordhuis <info@bnoordhuis.nl> | 2018-10-02 12:31:21 +0200 |
| commit | 24bbade217ed814bd6c4d94ed93442824b7153a4 (patch) | |
| tree | 3279ba5d4d6402e02bc2e8f5f94603c3c15f0a09 /src/link.cpp | |
| parent | cd211bcc20d3d1ddd1a50d57c7645aa3445934f0 (diff) | |
| download | zig-24bbade217ed814bd6c4d94ed93442824b7153a4.tar.gz zig-24bbade217ed814bd6c4d94ed93442824b7153a4.zip | |
fix build-exe for --target-arch wasm32 (#1570)
Pass --no-entry instead of --relocatable to lld. Both stop a reference
to the _start() entry point from being emitted but --relocatable also
prevents public symbols from being exported when creating an executable.
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/link.cpp b/src/link.cpp index 2b58f14266..e3753bff24 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -386,7 +386,7 @@ static void construct_linker_job_elf(LinkJob *lj) { static void construct_linker_job_wasm(LinkJob *lj) { CodeGen *g = lj->codegen; - lj->args.append("--relocatable"); // So lld doesn't look for _start. + lj->args.append("--no-entry"); // So lld doesn't look for _start. lj->args.append("-o"); lj->args.append(buf_ptr(&g->output_file_path)); |
