Create a stub object, based on the JS library symbols and their dependencies, for use by wasm-ld.
(external_symbols)
| 140 | |
| 141 | |
| 142 | def create_stub_object(external_symbols): |
| 143 | """Create a stub object, based on the JS library symbols and their dependencies, for use by wasm-ld.""" |
| 144 | stubfile = shared.get_temp_files().get('libemscripten_js_symbols.so').name |
| 145 | stubs = ['#STUB'] |
| 146 | for name, deps in external_symbols.items(): |
| 147 | if not name.startswith('$'): |
| 148 | stubs.append('%s: %s' % (name, ','.join(deps))) |
| 149 | utils.write_file(stubfile, '\n'.join(stubs)) |
| 150 | return stubfile |
| 151 | |
| 152 | |
| 153 | def lld_flags_for_executable(external_symbols): |
no test coverage detected