Bug 1605215 - apply shared library naming conventions to wasm sandboxed libraries; r=firefox-build-system-reviewers,rstewart

Because that's what they really are under the hood.

Depends on D57871

Differential Revision: https://phabricator.services.mozilla.com/D57872

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nathan Froyd 2019-12-19 20:54:38 +00:00
parent b9a840ed0e
commit cf45cda557

View File

@ -679,6 +679,18 @@ class SandboxedWasmLibrary(Library):
def __init__(self, context, basename, real_name=None):
Library.__init__(self, context, basename, real_name)
# TODO: WASM sandboxed libraries are in a weird place: they are
# built in a different way, but they should share some code with
# SharedLibrary. This is the minimal configuration needed to work
# with Linux, but it would need to be extended for other platforms.
assert context.config.substs['OS_TARGET'] == 'Linux'
self.lib_name = '%s%s%s' % (
context.config.dll_prefix,
real_name or basename,
context.config.dll_suffix,
)
def _obj_suffix(self):
"""Can be overridden by a base class for custom behavior."""
return self.config.substs.get('WASM_OBJ_SUFFIX', '')