Skip to content

Commit 42794c8

Browse files
authored
Don't always export writeStackCookie/checkStackCookie. NFC (#17426)
At some point these were used via the Module object but that is no longer the case so there is no need to export them. See #12630 for when the last such usage was removed. The code size regressions are only in ASSERTIONS builds and they are due to the assertions being present to check for unexported runtime methods.
1 parent 8185819 commit 42794c8

File tree

5 files changed

+3
-5
lines changed

5 files changed

+3
-5
lines changed

emcc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,6 @@ def phase_linker_setup(options, state, newargs, user_settings):
19121912
if settings.WASM2JS:
19131913
exit_with_error('WASM2JS is not compatible with relocatable output')
19141914
# shared modules need memory utilities to allocate their memory
1915-
settings.EXPORTED_RUNTIME_METHODS += ['allocate']
19161915
settings.ALLOW_TABLE_GROWTH = 1
19171916

19181917
# various settings require sbrk() access

emscripten.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def update_settings_glue(wasm_file, metadata):
156156
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$allocateUTF8OnStack']
157157

158158
if settings.STACK_OVERFLOW_CHECK and not settings.SIDE_MODULE:
159-
settings.EXPORTED_RUNTIME_METHODS += ['writeStackCookie', 'checkStackCookie']
160159
# writeStackCookie and checkStackCookie both rely on emscripten_stack_get_end being
161160
# exported. In theory it should always be present since its defined in compiler-rt.
162161
assert 'emscripten_stack_get_end' in metadata['exports']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
26713
1+
26718
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
21410
1+
21422
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
94954
1+
94964

0 commit comments

Comments
 (0)