|
53 | 53 | _deps_info = { |
54 | 54 | 'alarm': ['_emscripten_timeout'], |
55 | 55 | 'setitimer': ['_emscripten_timeout'], |
56 | | - 'Mix_LoadWAV_RW': ['fileno'], |
57 | | - 'SDL_CreateRGBSurface': ['malloc', 'free'], |
58 | 56 | 'SDL_GL_GetProcAddress': ['malloc'], |
59 | | - 'SDL_Init': ['malloc', 'free', 'memcpy'], |
60 | 57 | 'SDL_LockSurface': ['malloc', 'free'], |
61 | 58 | 'SDL_OpenAudio': ['malloc', 'free'], |
62 | 59 | 'SDL_PushEvent': ['malloc', 'free'], |
63 | | - 'SDL_free': ['free'], |
64 | | - 'SDL_malloc': ['malloc', 'free'], |
65 | 60 | '_embind_register_class': ['free'], |
66 | 61 | '_embind_register_enum_value': ['free'], |
67 | 62 | '_embind_register_function': ['free'], |
|
86 | 81 | 'emscripten_async_wget_data': ['malloc', 'free'], |
87 | 82 | 'emscripten_create_worker': ['malloc', 'free'], |
88 | 83 | 'emscripten_get_compiler_setting': ['malloc'], |
89 | | - 'emscripten_get_preloaded_image_data': ['malloc'], |
90 | | - 'emscripten_get_preloaded_image_data_from_FILE': ['fileno'], |
91 | 84 | 'emscripten_get_window_title': ['malloc'], |
92 | 85 | 'emscripten_idb_async_load': ['malloc', 'free'], |
93 | 86 | 'emscripten_idb_load': ['malloc', 'free'], |
|
100 | 93 | 'emscripten_longjmp': ['malloc', 'free', 'saveSetjmp', 'setThrew'], |
101 | 94 | 'emscripten_pc_get_file': ['malloc', 'free'], |
102 | 95 | 'emscripten_pc_get_function': ['malloc', 'free'], |
103 | | - 'emscripten_run_preload_plugins_data': ['malloc'], |
104 | 96 | 'emscripten_run_script_string': ['malloc', 'free'], |
105 | 97 | 'emscripten_set_batterychargingchange_callback_on_thread': ['malloc'], |
106 | 98 | 'emscripten_set_batterylevelchange_callback_on_thread': ['malloc'], |
|
176 | 168 | # directly include invokes in deps_info.py, so we list it as a setjmp's |
177 | 169 | # dependency. |
178 | 170 | 'setjmp': ['malloc', 'free', 'saveSetjmp', 'setThrew'], |
179 | | - 'setprotoent': ['malloc'], |
180 | 171 | 'syslog': ['malloc', 'ntohs', 'htons'], |
181 | 172 | 'vsyslog': ['malloc', 'ntohs', 'htons'], |
182 | 173 | 'timegm': ['malloc'], |
183 | 174 | 'tzset': ['malloc'], |
184 | | - 'uuid_compare': ['memcmp'], |
185 | | - 'uuid_copy': ['memcpy'], |
186 | 175 | 'wgpuBufferGetMappedRange': ['malloc', 'free'], |
187 | 176 | 'wgpuBufferGetConstMappedRange': ['malloc', 'free'], |
188 | 177 | 'emscripten_glGetString': ['malloc'], |
189 | 178 | } |
190 | 179 |
|
191 | 180 |
|
| 181 | +def append_deps_info(js_symbol_deps): |
| 182 | + for key, value in js_symbol_deps.items(): |
| 183 | + if value: |
| 184 | + _deps_info.setdefault(key, []) |
| 185 | + _deps_info[key] += value |
| 186 | + |
| 187 | + |
192 | 188 | def get_deps_info(): |
193 | 189 | if not settings.WASM_EXCEPTIONS and settings.LINK_AS_CXX: |
194 | 190 | _deps_info['__cxa_begin_catch'] = ['__cxa_is_pointer_type', '__cxa_free_exception'] |
|
0 commit comments