Skip to content

Commit c22d005

Browse files
committed
Preparing for auto-generation of signatures for src/library_wasm_worker.js
Split out from #19263
1 parent 15488c5 commit c22d005

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

system/lib/wasm_worker/library_wasm_worker.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ emscripten_wasm_worker_t emscripten_create_wasm_worker(void *stackLowestAddress,
4343
// We expect TLS area to need to be at most 16 bytes aligned
4444
assert(__builtin_wasm_tls_align() == 0 || 16 % __builtin_wasm_tls_align() == 0);
4545

46+
#ifndef NDEBUG
4647
uint32_t tlsSize = (__builtin_wasm_tls_size() + 15) & -16;
48+
#endif
4749
assert(stackSize > tlsSize);
4850

4951
return _emscripten_create_wasm_worker(stackLowestAddress, stackSize);

tools/system_libs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,14 +1333,15 @@ def can_use(self):
13331333

13341334

13351335
class libwasm_workers(MTLibrary):
1336+
name = 'libwasm_workers'
1337+
includes = ['system/lib/libc']
1338+
13361339
def __init__(self, **kwargs):
13371340
self.debug = kwargs.pop('debug')
13381341
super().__init__(**kwargs)
13391342

1340-
name = 'libwasm_workers'
1341-
13421343
def get_cflags(self):
1343-
cflags = get_base_cflags() + ['-D_DEBUG' if self.debug else '-Oz']
1344+
cflags = super().get_cflags() + ['-D_DEBUG' if self.debug else '-Oz']
13441345
if self.debug:
13451346
# library_wasm_worker.c contains an assert that a nonnull paramater
13461347
# is no NULL, which llvm now warns is redundant/tautological.

0 commit comments

Comments
 (0)