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

Function create_stub_object

tools/building.py:142–150  ·  view source on GitHub ↗

Create a stub object, based on the JS library symbols and their dependencies, for use by wasm-ld.

(external_symbols)

Source from the content-addressed store, hash-verified

140
141
142def 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
153def lld_flags_for_executable(external_symbols):

Callers 1

lld_flags_for_executableFunction · 0.85

Calls 4

appendMethod · 0.80
write_fileMethod · 0.80
getMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected