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

Function calc_extra_ldflags

tools/link.py:3079–3102  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

3077
3078
3079def calc_extra_ldflags(options):
3080 extra_args = []
3081 system_libpath = str(cache.get_lib_dir(absolute=True))
3082 system_js_path = utils.path_from_root('src', 'lib')
3083 options.lib_dirs.append(system_libpath)
3084 options.lib_dirs.append(system_js_path)
3085 extra_args.append('-L' + system_libpath)
3086 extra_args.append('-L' + system_js_path)
3087
3088 if settings.FETCH:
3089 extra_args.append('-lfetch')
3090 if settings.STB_IMAGE:
3091 extra_args.append('-lstb_image')
3092 if settings.WASMFS and settings.NODERAWFS:
3093 # wasmfs will be included normally in system_libs.py, but we must include
3094 # noderawfs in a forced manner so that it is always linked in (the hook it
3095 # implements can remain unimplemented, so it won't be linked in
3096 # automatically)
3097 # TODO: find a better way to do this
3098 extra_args.append('--whole-archive')
3099 extra_args.append('-lwasmfs_noderawfs')
3100 extra_args.append('--no-whole-archive')
3101
3102 return extra_args
3103
3104
3105def run_post_link(wasm_input, options, linker_args):

Callers 1

phase_linker_setupFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected