Skip to content

Commit

Permalink
Revert "Fix STACKTOP/STACK_MAX variables for relocatable (emscripten-…
Browse files Browse the repository at this point in the history
…core#8434)"

This reverts commit a365dba.
  • Loading branch information
VirtualTim authored May 23, 2019
1 parent b5f8803 commit 8f80b1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def create_module_asmjs(function_table_sigs, metadata,
asm_runtime_thread_local_vars = create_asm_runtime_thread_local_vars()

stack = ''
if not shared.Settings.RELOCATABLE and not (shared.Settings.WASM and shared.Settings.SIDE_MODULE):
if not (shared.Settings.WASM and shared.Settings.SIDE_MODULE):
if 'STACKTOP' in shared.Settings.ASM_PRIMITIVE_VARS:
stack += apply_memory(' var STACKTOP = {{{ STACK_BASE }}};\n')
if 'STACK_MAX' in shared.Settings.ASM_PRIMITIVE_VARS:
Expand Down Expand Up @@ -1585,7 +1585,7 @@ def create_basic_vars(exported_implemented_functions, forwarded_json, metadata):

if shared.Settings.RELOCATABLE:
if not (shared.Settings.WASM and shared.Settings.SIDE_MODULE):
basic_vars += ['gb', 'fb', 'STACKTOP', 'STACK_MAX']
basic_vars += ['gb', 'fb']
else:
# wasm side modules have a specific convention for these
basic_vars += ['__memory_base', '__table_base']
Expand Down
2 changes: 1 addition & 1 deletion tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -7982,7 +7982,7 @@ def run(*args):
0, [], [], 8, 0, 0, 0) # noqa; totally empty!
# we don't metadce with linkable code! other modules may want stuff
run(['-O3', '-s', 'MAIN_MODULE=1'],
1541, [], [], 226403, 30, 95, None) # noqa; don't compare the # of functions in a main module, which changes a lot
1539, [], [], 226403, 28, 95, None) # noqa; don't compare the # of functions in a main module, which changes a lot

# ensures runtime exports work, even with metadce
def test_extra_runtime_exports(self):
Expand Down

0 comments on commit 8f80b1e

Please sign in to comment.