wasm-idle 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clang/index.js +2 -2
- package/package.json +1 -1
package/dist/clang/index.js
CHANGED
|
@@ -70,7 +70,7 @@ export default class Clang {
|
|
|
70
70
|
await this.ready;
|
|
71
71
|
this.memfs.addFile(input, code);
|
|
72
72
|
const clang = await this.getModule(clangUrl(this.path));
|
|
73
|
-
return await this.run(clang, this.log, 'clang', '-cc1', '-emit-obj', ...clangCommonArgs, '-O' + opt, '-o', obj, '-x', 'c++', input);
|
|
73
|
+
return await this.run(clang, this.log, 'clang', '-cc1', '-emit-obj', ...clangCommonArgs, '-O' + opt, '-o', obj, '-std=c++17', '-x', 'c++', input);
|
|
74
74
|
}
|
|
75
75
|
async link(obj, wasm) {
|
|
76
76
|
const stackSize = 1024 * 1024;
|
|
@@ -79,7 +79,7 @@ export default class Clang {
|
|
|
79
79
|
await this.ready;
|
|
80
80
|
const lld = await this.getModule(lldUrl(this.path));
|
|
81
81
|
return await this.run(lld, this.log, 'wasm-ld', '--no-threads', '--export-dynamic', // TODO required?
|
|
82
|
-
'-z', `stack-size=${stackSize}`, `-L${libdir}`, crt1, obj, '-lc', '-lc++', '-lc++abi', '-
|
|
82
|
+
'-z', `stack-size=${stackSize}`, `-L${libdir}`, crt1, obj, '-lc', '-lc++', '-lc++abi', '-o', wasm);
|
|
83
83
|
}
|
|
84
84
|
async run(module, out, ...args) {
|
|
85
85
|
this.memfs.out = out;
|