Skip to content

Commit

Permalink
Move out the -s parameters for emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Oct 5, 2023
1 parent 14ec34c commit 782473b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 7 additions & 2 deletions kmake/src/Exporters/EmscriptenExporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,20 @@ export class EmscriptenExporter extends Exporter {
}
this.p('INC=' + incline);

let libsline = '-static-libgcc -static-libstdc++ -sUSE_GLFW=2';
let libsline = '-static-libgcc -static-libstdc++';
if (project.targetOptions.emscripten.threads) {
libsline += ' -pthread';
}
/*if (project.cmd) {
libsline += ' -static';
}*/
for (let lib of project.getLibs()) {
libsline += ' -l' + lib;
if (lib.startsWith('USE_')) {
libsline += ' -s' + lib;
}
else {
libsline += ' -l' + lib;
}
}
this.p('LIB=' + libsline);

Expand Down
9 changes: 7 additions & 2 deletions lib/kmake/Exporters/EmscriptenExporter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/kmake/Exporters/EmscriptenExporter.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 782473b

Please sign in to comment.