File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1096,10 +1096,16 @@ static void construct_linker_job_wasm(LinkJob *lj) {
1096
1096
lj->args .append (" --no-entry" ); // So lld doesn't look for _start.
1097
1097
}
1098
1098
lj->args .append (" --allow-undefined" );
1099
- lj->args .append (" --export-all" );
1100
1099
lj->args .append (" -o" );
1101
1100
lj->args .append (buf_ptr (&g->output_file_path ));
1102
1101
1102
+ auto export_it = g->exported_symbol_names .entry_iterator ();
1103
+ decltype (g->exported_symbol_names )::Entry *curr_entry = nullptr ;
1104
+ while ((curr_entry = export_it.next ()) != nullptr ) {
1105
+ Buf *arg = buf_sprintf (" --export=%s" , buf_ptr (curr_entry->key ));
1106
+ lj->args .append (buf_ptr (arg));
1107
+ }
1108
+
1103
1109
// .o files
1104
1110
for (size_t i = 0 ; i < g->link_objects .length ; i += 1 ) {
1105
1111
lj->args .append ((const char *)buf_ptr (g->link_objects .at (i)));
You can’t perform that action at this time.
0 commit comments