Skip to content

Commit b4f7e9f

Browse files
authored
Deprecate EMULATE_FUNCTION_POINTER_CASTS setting (#23953)
Users who use this setting will now see the following warning: ``` emcc: warning: EMULATE_FUNCTION_POINTER_CASTS is deprecated (no known users). Please open a bug if you have a continuing need for this setting [-Wdeprecated] ``` See #23952
1 parent 5317e44 commit b4f7e9f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

test/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7142,7 +7142,7 @@ def test_emulate_function_pointer_casts(self):
71427142
# https://github.com/emscripten-core/emscripten/issues/15081
71437143
self.set_setting('EXIT_RUNTIME', 0)
71447144
self.set_setting('EMULATE_FUNCTION_POINTER_CASTS')
7145-
self.do_core_test('test_emulate_function_pointer_casts.cpp')
7145+
self.do_core_test('test_emulate_function_pointer_casts.cpp', emcc_args=['-Wno-deprecated'])
71467146

71477147
@no_wasm2js('TODO: nicely printed names in wasm2js')
71487148
@parameterized({

test/test_other.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5715,7 +5715,7 @@ def test_bad_function_pointer_cast(self, opts, wasm, safe):
57155715
if safe:
57165716
cmd += ['-sSAFE_HEAP']
57175717
if emulate_casts:
5718-
cmd += ['-sEMULATE_FUNCTION_POINTER_CASTS']
5718+
cmd += ['-sEMULATE_FUNCTION_POINTER_CASTS', '-Wno-deprecated']
57195719
if relocatable:
57205720
cmd += ['-sRELOCATABLE'] # disables asm-optimized safe heap
57215721
print(cmd)
@@ -12488,7 +12488,7 @@ def test_setjmp_emulated_casts(self):
1248812488
}
1248912489
}
1249012490
''')
12491-
self.do_runf('src.c', 'ok\ndone\n', emcc_args=['-sEMULATE_FUNCTION_POINTER_CASTS'])
12491+
self.do_runf('src.c', 'ok\ndone\n', emcc_args=['-Wno-deprecated', '-sEMULATE_FUNCTION_POINTER_CASTS'])
1249212492

1249312493
def test_no_lto(self):
1249412494
# This used to fail because settings.LTO didn't reflect `-fno-lto`.

tools/settings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@
124124
'RUNTIME_LINKED_LIBS': 'you can simply list the libraries directly on the commandline now',
125125
'CLOSURE_WARNINGS': 'use -Wclosure instead',
126126
'LEGALIZE_JS_FFI': 'to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`',
127-
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead'
127+
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead',
128+
'EMULATE_FUNCTION_POINTER_CASTS': 'lack of usage',
128129
}
129130

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

0 commit comments

Comments
 (0)