Skip to content

Deprecate EMULATE_FUNCTION_POINTER_CASTS setting #23953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7142,7 +7142,7 @@ def test_emulate_function_pointer_casts(self):
# https://github.com/emscripten-core/emscripten/issues/15081
self.set_setting('EXIT_RUNTIME', 0)
self.set_setting('EMULATE_FUNCTION_POINTER_CASTS')
self.do_core_test('test_emulate_function_pointer_casts.cpp')
self.do_core_test('test_emulate_function_pointer_casts.cpp', emcc_args=['-Wno-deprecated'])

@no_wasm2js('TODO: nicely printed names in wasm2js')
@parameterized({
Expand Down
4 changes: 2 additions & 2 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -5715,7 +5715,7 @@ def test_bad_function_pointer_cast(self, opts, wasm, safe):
if safe:
cmd += ['-sSAFE_HEAP']
if emulate_casts:
cmd += ['-sEMULATE_FUNCTION_POINTER_CASTS']
cmd += ['-sEMULATE_FUNCTION_POINTER_CASTS', '-Wno-deprecated']
if relocatable:
cmd += ['-sRELOCATABLE'] # disables asm-optimized safe heap
print(cmd)
Expand Down Expand Up @@ -12488,7 +12488,7 @@ def test_setjmp_emulated_casts(self):
}
}
''')
self.do_runf('src.c', 'ok\ndone\n', emcc_args=['-sEMULATE_FUNCTION_POINTER_CASTS'])
self.do_runf('src.c', 'ok\ndone\n', emcc_args=['-Wno-deprecated', '-sEMULATE_FUNCTION_POINTER_CASTS'])

def test_no_lto(self):
# This used to fail because settings.LTO didn't reflect `-fno-lto`.
Expand Down
3 changes: 2 additions & 1 deletion tools/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
'RUNTIME_LINKED_LIBS': 'you can simply list the libraries directly on the commandline now',
'CLOSURE_WARNINGS': 'use -Wclosure instead',
'LEGALIZE_JS_FFI': 'to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`',
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead'
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead',
'EMULATE_FUNCTION_POINTER_CASTS': 'lack of usage',
}

# Settings that don't need to be externalized when serializing to json because they
Expand Down