Skip to content

Commit

Permalink
Flake and lint and fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
juj committed Feb 17, 2022
1 parent a2a49fb commit e163422
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ignorePatterns:
- "src/embind/"
- "src/emrun_postjs.js"
- "src/worker.js"
- "src/wasm_worker.js"
- "src/wasm2js.js"
- "src/webGLClient.js"
- "src/webGLWorker.js"
Expand Down
4 changes: 2 additions & 2 deletions src/jsifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ function ${name}(${args}) {
// (since there is no automatic proxying architecture available)
contentText = modifyFunction(snippet, function(name, args, body) {
return 'function ' + name + '(' + args + ') {\n' +
'assert(!ENVIRONMENT_IS_WASM_WORKER, "Attempted to call proxied function \\"' + name + '\\" in a Wasm Worker, but in Wasm Worker enabled builds, proxied function architecture is not available!");\n'
+ body + '}\n';
'assert(!ENVIRONMENT_IS_WASM_WORKER, "Attempted to call proxied function \\"' + name + '\\" in a Wasm Worker, but in Wasm Worker enabled builds, proxied function architecture is not available!");\n' +
body + '}\n';
});
} else if ((USE_ASAN || USE_LSAN || UBSAN_RUNTIME) && LibraryManager.library[ident + '__noleakcheck']) {
contentText = modifyFunction(snippet, (name, args, body) => `
Expand Down
2 changes: 1 addition & 1 deletion system/lib/wasm_worker/library_wasm_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ emscripten_wasm_worker_t emscripten_create_wasm_worker_no_tls(void *stackLowestA
emscripten_wasm_worker_t emscripten_malloc_wasm_worker(uint32_t stackSize)
{
#if WASM_WORKER_NO_TLS
return emscripten_create_wasm_worker_no_tls(memalign(16, stackSize), stackSize, 0, 0);
return emscripten_create_wasm_worker_no_tls(memalign(16, stackSize), stackSize);
#else
uint32_t tlsSize = __builtin_wasm_tls_size();
return emscripten_create_wasm_worker_with_tls(memalign(16, stackSize), stackSize, memalign(__builtin_wasm_tls_align(), tlsSize), tlsSize);
Expand Down
12 changes: 8 additions & 4 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ def variations(cls):
# pthreads and Wasm workers are currently not supported together.
return [combo for combo in combos if not combo['is_mt'] or not combo['is_ww']]


class DebugLibrary(Library):
def __init__(self, **kwargs):
self.is_debug = kwargs.pop('is_debug')
Expand Down Expand Up @@ -1042,9 +1043,12 @@ def get_cflags(self):

def get_base_name(self):
name = 'libwasm_workers'
if not self.tls: name += '-notls'
if self.debug: name += '-debug'
if self.stack_check: name += '-stackcheck'
if not self.tls:
name += '-notls'
if self.debug:
name += '-debug'
if self.stack_check:
name += '-stackcheck'
return name

@classmethod
Expand All @@ -1053,7 +1057,7 @@ def vary_on(cls):

@classmethod
def get_default_variation(cls, **kwargs):
return super().get_default_variation(tls=not settings.WASM_WORKERS_NO_TLS, debug=settings.ASSERTIONS>=1, stack_check=settings.STACK_OVERFLOW_CHECK==2, **kwargs)
return super().get_default_variation(tls=not settings.WASM_WORKERS_NO_TLS, debug=settings.ASSERTIONS >= 1, stack_check=settings.STACK_OVERFLOW_CHECK == 2, **kwargs)

def get_files(self):
return files_in_path(
Expand Down

0 comments on commit e163422

Please sign in to comment.