mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-14 20:16:10 +00:00
Bug 1319228 - Build dependentlibs.list in the tup backend, create a group for shared libraries to be used as its input. r=mshal
MozReview-Commit-ID: 5nDZpTcqVfv --HG-- extra : rebase_source : faa44a40404b24f753ba25962397a1ca484de3fe
This commit is contained in:
parent
c70aa1dec3
commit
30f730a545
@ -259,6 +259,8 @@ class TupBackend(CommonBackend):
|
|||||||
self._built_in_addons = set()
|
self._built_in_addons = set()
|
||||||
self._built_in_addons_file = 'dist/bin/browser/chrome/browser/content/browser/built_in_addons.json'
|
self._built_in_addons_file = 'dist/bin/browser/chrome/browser/content/browser/built_in_addons.json'
|
||||||
|
|
||||||
|
self._shlibs = '$(MOZ_OBJ_ROOT)/<shlibs>'
|
||||||
|
|
||||||
def _get_mozconfig_env(self, config):
|
def _get_mozconfig_env(self, config):
|
||||||
env = {}
|
env = {}
|
||||||
loader = MozconfigLoader(config.topsrcdir)
|
loader = MozconfigLoader(config.topsrcdir)
|
||||||
@ -383,13 +385,15 @@ class TupBackend(CommonBackend):
|
|||||||
inputs=inputs,
|
inputs=inputs,
|
||||||
extra_inputs=extra_inputs,
|
extra_inputs=extra_inputs,
|
||||||
outputs=[shlib.lib_name],
|
outputs=[shlib.lib_name],
|
||||||
|
extra_outputs=[self._shlibs],
|
||||||
display='LINK %o'
|
display='LINK %o'
|
||||||
)
|
)
|
||||||
backend_file.symlink_rule(mozpath.join(backend_file.objdir,
|
backend_file.symlink_rule(mozpath.join(backend_file.objdir,
|
||||||
shlib.lib_name),
|
shlib.lib_name),
|
||||||
output=mozpath.join(self.environment.topobjdir,
|
output=mozpath.join(self.environment.topobjdir,
|
||||||
shlib.install_target,
|
shlib.install_target,
|
||||||
shlib.lib_name))
|
shlib.lib_name),
|
||||||
|
output_group=self._shlibs)
|
||||||
|
|
||||||
def _gen_programs(self, backend_file):
|
def _gen_programs(self, backend_file):
|
||||||
for p in backend_file.programs:
|
for p in backend_file.programs:
|
||||||
@ -401,7 +405,10 @@ class TupBackend(CommonBackend):
|
|||||||
static_libs = self._lib_paths(backend_file.objdir, static_libs)
|
static_libs = self._lib_paths(backend_file.objdir, static_libs)
|
||||||
shared_libs = self._lib_paths(backend_file.objdir, shared_libs)
|
shared_libs = self._lib_paths(backend_file.objdir, shared_libs)
|
||||||
|
|
||||||
inputs = objs + static_libs + shared_libs
|
# Linking some programs will access libraries installed to dist/bin,
|
||||||
|
# so depend on the installed libraries here. This can be made more
|
||||||
|
# accurate once we start building libraries in their final locations.
|
||||||
|
inputs = objs + static_libs + shared_libs + [self._shlibs]
|
||||||
|
|
||||||
list_file_name = '%s.list' % prog.name.replace('.', '_')
|
list_file_name = '%s.list' % prog.name.replace('.', '_')
|
||||||
list_file = self._make_list_file(backend_file.objdir, objs, list_file_name)
|
list_file = self._make_list_file(backend_file.objdir, objs, list_file_name)
|
||||||
@ -847,6 +854,11 @@ class TupBackend(CommonBackend):
|
|||||||
extra_outputs = [self._installed_files] if obj.required_for_compile else []
|
extra_outputs = [self._installed_files] if obj.required_for_compile else []
|
||||||
full_inputs += [self._early_generated_files]
|
full_inputs += [self._early_generated_files]
|
||||||
|
|
||||||
|
extra_inputs = []
|
||||||
|
if any(f in obj.outputs for f in ('dependentlibs.list',
|
||||||
|
'dependendentlibs.list.gtest')):
|
||||||
|
extra_inputs += [self._shlibs]
|
||||||
|
|
||||||
if len(outputs) > 3:
|
if len(outputs) > 3:
|
||||||
display_outputs = ', '.join(outputs[0:3]) + ', ...'
|
display_outputs = ', '.join(outputs[0:3]) + ', ...'
|
||||||
else:
|
else:
|
||||||
@ -860,6 +872,7 @@ class TupBackend(CommonBackend):
|
|||||||
display=display,
|
display=display,
|
||||||
cmd=cmd,
|
cmd=cmd,
|
||||||
inputs=full_inputs,
|
inputs=full_inputs,
|
||||||
|
extra_inputs=extra_inputs,
|
||||||
outputs=outputs,
|
outputs=outputs,
|
||||||
extra_outputs=extra_outputs,
|
extra_outputs=extra_outputs,
|
||||||
check_unchanged=True,
|
check_unchanged=True,
|
||||||
@ -947,10 +960,6 @@ class TupBackend(CommonBackend):
|
|||||||
# so do not attempt to install it.
|
# so do not attempt to install it.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# We're not generating files in these directories yet, so
|
|
||||||
# don't attempt to install files generated from them.
|
|
||||||
if f.context.relobjdir not in ('toolkit/library',
|
|
||||||
'js/src/shell'):
|
|
||||||
output = mozpath.join('$(MOZ_OBJ_ROOT)', target, path,
|
output = mozpath.join('$(MOZ_OBJ_ROOT)', target, path,
|
||||||
f.target_basename)
|
f.target_basename)
|
||||||
gen_backend_file = self._get_backend_file(f.context.relobjdir)
|
gen_backend_file = self._get_backend_file(f.context.relobjdir)
|
||||||
|
@ -128,7 +128,8 @@ def gen_list(output, lib):
|
|||||||
func = dependentlibs_dumpbin
|
func = dependentlibs_dumpbin
|
||||||
|
|
||||||
deps = dependentlibs(lib, libpaths, func)
|
deps = dependentlibs(lib, libpaths, func)
|
||||||
deps[lib] = mozpath.join(libpaths[0], lib)
|
base_lib = mozpath.basename(lib)
|
||||||
|
deps[base_lib] = mozpath.join(libpaths[0], base_lib)
|
||||||
output.write('\n'.join(deps.keys()) + '\n')
|
output.write('\n'.join(deps.keys()) + '\n')
|
||||||
|
|
||||||
with open(output.name + ".gtest", 'w') as gtest_out:
|
with open(output.name + ".gtest", 'w') as gtest_out:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user