mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Switch wasm export-all to only values marked exports
This commit is contained in:
parent
fca3e3a73f
commit
8d58dc715b
@ -1096,10 +1096,16 @@ static void construct_linker_job_wasm(LinkJob *lj) {
|
||||
lj->args.append("--no-entry"); // So lld doesn't look for _start.
|
||||
}
|
||||
lj->args.append("--allow-undefined");
|
||||
lj->args.append("--export-all");
|
||||
lj->args.append("-o");
|
||||
lj->args.append(buf_ptr(&g->output_file_path));
|
||||
|
||||
auto export_it = g->exported_symbol_names.entry_iterator();
|
||||
decltype(g->exported_symbol_names)::Entry *curr_entry = nullptr;
|
||||
while ((curr_entry = export_it.next()) != nullptr) {
|
||||
Buf *arg = buf_sprintf("--export=%s", buf_ptr(curr_entry->key));
|
||||
lj->args.append(buf_ptr(arg));
|
||||
}
|
||||
|
||||
// .o files
|
||||
for (size_t i = 0; i < g->link_objects.length; i += 1) {
|
||||
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user