MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / get_js_sym_info

Function get_js_sym_info

tools/link.py:230–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228
229@ToolchainProfiler.profile_block('JS symbol generation')
230def get_js_sym_info():
231 # Avoiding using the cache when generating struct info since
232 # this step is performed while the cache is locked.
233 if DEBUG or settings.BOOTSTRAPPING_STRUCT_INFO or config.FROZEN_CACHE:
234 return generate_js_sym_info()
235
236 content_hash = emscripten.generate_js_compiler_input_hash(symbols_only=True)
237
238 def generate_json():
239 library_syms = generate_js_sym_info()
240 return json.dumps(library_syms, separators=(',', ':'), indent=2)
241
242 # Limit of the overall size of the cache.
243 # This code will get test coverage since a full test run of `other` or `core`
244 # generates ~1000 unique symbol lists.
245 file_content = emscripten.get_cached_file('symbol_lists', f'{content_hash}.json', generate_json, cache_limit=500)
246 return json.loads(file_content)
247
248
249def filter_link_flags(flags, using_lld):

Callers 1

runFunction · 0.85

Calls 1

generate_js_sym_infoFunction · 0.85

Tested by

no test coverage detected