()
| 228 | |
| 229 | @ToolchainProfiler.profile_block('JS symbol generation') |
| 230 | def 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 | |
| 249 | def filter_link_flags(flags, using_lld): |
no test coverage detected