1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
From: Yadd <yadd@debian.org>
Date: Mon, 1 Dec 2025 21:24:25 +0100
Subject: try to fix emscripten
Forwarded: not-needed
Last-Update: 2023-09-14
---
inwasm/src/runners/emscripten_c.ts | 6 +++---
testproject/src/example_emscripten_c.wasm.ts | 4 ++--
testproject/src/tests/emscripten_c.test.wasm.ts | 10 +++++-----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/inwasm/src/runners/emscripten_c.ts b/inwasm/src/runners/emscripten_c.ts
index 02fdac0..b63a318 100644
--- a/inwasm/src/runners/emscripten_c.ts
+++ b/inwasm/src/runners/emscripten_c.ts
@@ -23,7 +23,7 @@ export default function(def: IWasmDefinition, buildDir: string, filename: string
// memory settings
if (memorySettings.descriptor) {
if (memorySettings.descriptor.initial !== undefined) {
- switches.push(`-s INITIAL_MEMORY=${memorySettings.descriptor.initial * 65536}`);
+ // switches.push(`-s INITIAL_MEMORY=${memorySettings.descriptor.initial * 65536}`);
}
if (memorySettings.descriptor.maximum !== undefined) {
if (memorySettings.descriptor.initial !== memorySettings.descriptor.maximum) {
@@ -33,7 +33,7 @@ export default function(def: IWasmDefinition, buildDir: string, filename: string
}
}
if (memorySettings.mode === 'imported') {
- switches.push('-s IMPORTED_MEMORY=1');
+ // switches.push('-s IMPORTED_MEMORY=1');
}
// apply custom switches late
@@ -42,7 +42,7 @@ export default function(def: IWasmDefinition, buildDir: string, filename: string
}
// FIXME:
- switches.push(...['-s ERROR_ON_UNDEFINED_SYMBOLS=0', '-s WARN_ON_UNDEFINED_SYMBOLS=0']);
+ //switches.push(...['-s ERROR_ON_UNDEFINED_SYMBOLS=0', '-s WARN_ON_UNDEFINED_SYMBOLS=0']);
const funcs = ['-s', `EXPORTED_FUNCTIONS=${_funcs}`];
const bin = '/usr/bin/emcc';
diff --git a/testproject/src/example_emscripten_c.wasm.ts b/testproject/src/example_emscripten_c.wasm.ts
index c932b2b..5dad46c 100644
--- a/testproject/src/example_emscripten_c.wasm.ts
+++ b/testproject/src/example_emscripten_c.wasm.ts
@@ -43,7 +43,7 @@ const convert_simd = InWasm({
srctype: 'C',
compile: {
defines: { CHUNK_SIZE: SETTINGS.chunkSize },
- switches: ['-msimd128', '-msse', '-msse2', '-mssse3', '-msse4.1', '-s TOTAL_STACK=0', '-s IMPORTED_MEMORY=1']
+ switches: ['-msimd128', '-msse', '-msse2', '-mssse3', '-msse4.1']
},
imports: importObj,
exports: {
@@ -94,7 +94,7 @@ const convert_scalar = InWasm({
srctype: 'C',
compile: {
defines: { CHUNK_SIZE: SETTINGS.chunkSize },
- switches: ['-s TOTAL_STACK=0', '-s IMPORTED_MEMORY=1']
+ switches: []
},
imports: importObj,
exports: {
diff --git a/testproject/src/tests/emscripten_c.test.wasm.ts b/testproject/src/tests/emscripten_c.test.wasm.ts
index 60c5077..2620c93 100644
--- a/testproject/src/tests/emscripten_c.test.wasm.ts
+++ b/testproject/src/tests/emscripten_c.test.wasm.ts
@@ -23,7 +23,7 @@ describe('emscripten-c', () => {
mode: OutputMode.SYNC,
srctype: 'C',
compile: {
- switches: ['-s TOTAL_STACK=0']
+ switches: []
},
exports: {
memory: new WebAssembly.Memory({ initial: 1 })
@@ -42,7 +42,7 @@ describe('emscripten-c', () => {
mode: OutputMode.SYNC,
srctype: 'C',
compile: {
- switches: ['-s TOTAL_STACK=0']
+ switches: []
},
exports: {
memory: new WebAssembly.Memory({ initial: 1, maximum: 1 })
@@ -60,7 +60,7 @@ describe('emscripten-c', () => {
mode: OutputMode.SYNC,
srctype: 'C',
compile: {
- switches: ['-s TOTAL_STACK=0']
+ switches: []
},
exports: {
memory: new WebAssembly.Memory({ initial: 2, maximum: 20 })
@@ -80,7 +80,7 @@ describe('emscripten-c', () => {
mode: OutputMode.SYNC,
srctype: 'C',
compile: {
- switches: ['-s TOTAL_STACK=0']
+ switches: []
},
imports: importObj,
exports: {
@@ -111,7 +111,7 @@ describe('emscripten-c', () => {
mode: OutputMode.SYNC,
srctype: 'C',
compile: {
- switches: ['-s TOTAL_STACK=0']
+ switches: []
},
imports: importObj,
exports: {
|