Bug 1573566 - Undo bug 1573314 and bug 1572046. r=froydnj

With the addition of toolkit/library/build because of the rust
shenanigans, bug 1573314 and bug 1572046 don't do anything useful
anymore. We're going to do something better anyways.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-08-16 14:39:54 +00:00
Родитель eff4ccba27
Коммит c15df41c2f
4 изменённых файлов: 6 добавлений и 35 удалений

Просмотреть файл

@ -19,7 +19,7 @@ ifdef SHARED_LIBRARY
SHARED_LIBRARY_FILES = $(SHARED_LIBRARY)
SHARED_LIBRARY_DEST ?= $(FINAL_TARGET)
ifndef SHARED_LIBRARY_TARGET
SHARED_LIBRARY_TARGET = target-shared
SHARED_LIBRARY_TARGET = target
endif
INSTALL_TARGETS += SHARED_LIBRARY
endif # SHARED_LIBRARY

Просмотреть файл

@ -73,12 +73,7 @@ CURRENT_DIRS := $($(CURRENT_TIER)_dirs)
$(compile_targets) $(syms_targets):
$(if $(filter $(RECURSE_BASE_DIR)%,$@),$(call RECURSE,$(@F),$(@D)))
# Equivalent to a mix of:
# $(syms_targets): %/syms: %/target
# and
# $(syms_targets): %/syms: %/target-shared
# for the right syms targets.
$(foreach syms_target,$(syms_targets),$(eval $(syms_target): $(filter $(dir $(syms_target))target $(dir $(syms_target))target-shared,$(compile_targets))))
$(syms_targets): %/syms: %/target
# Only hook symbols targets into the main compile graph in automation.
ifdef MOZ_AUTOMATION
@ -194,7 +189,7 @@ endif
# Interdependencies that moz.build world don't know about yet for compilation.
# Note some others are hardcoded or "guessed" in recursivemake.py and emitter.py
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3)
toolkit/library/target-shared: widget/gtk/mozgtk/gtk3/target-shared
toolkit/library/target: widget/gtk/mozgtk/gtk3/target
endif
endif
# Most things are built during compile (target/host), but some things happen during export

Просмотреть файл

@ -412,8 +412,7 @@ compile:: host target
host:: $(HOST_OBJS) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(HOST_RUST_PROGRAMS) $(HOST_RUST_LIBRARY_FILE) $(HOST_SHARED_LIBRARY)
target:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_LIBRARY_FILE) $(RUST_PROGRAMS))
target-shared:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(SHARED_LIBRARY))
target:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_LIBRARY_FILE) $(RUST_PROGRAMS))
ifndef LIBRARY
ifdef OBJS

Просмотреть файл

@ -839,38 +839,18 @@ class RecursiveMakeBackend(CommonBackend):
# rest of the compile graph.
target_name = mozpath.basename(root)
if target_name not in ('target', 'target-shared', 'host'):
if target_name not in ('target', 'host'):
non_default_roots[target_name].append(root)
non_default_graphs[target_name][root] = self._compile_graph[root]
del self._compile_graph[root]
targets_per_directory = defaultdict(list)
for target in self._compile_graph.iterkeys():
targets_per_directory[mozpath.dirname(target)].append(
mozpath.basename(target))
# In directories that have both a shared and a static library, there
# may also be source files that are applied to both. What can happen
# then is that both the shared and static library are attempted to be
# built in parallel via other dependencies, and both try to build the
# same source files at the same time, and that can lead to race
# conditions and build failures. This means we need an implicit
# dependency between the shared and the static library that the library
# graph doesn't necessarily know about, so we encode it in the compile
# graph manually.
for directory, targets in targets_per_directory.iteritems():
if 'target-shared' in targets and 'target' in targets:
self._compile_graph[mozpath.join(directory, 'target-shared')].add(
mozpath.join(directory, 'target'))
for root in chain(*non_default_roots.values()):
compile_roots.remove(root)
dirname = mozpath.dirname(root)
# If a directory only contains non-default compile targets, we don't
# attempt to dump symbols there.
if (dirname in self._no_skip['syms'] and
'%s/target' % dirname not in self._compile_graph and
'%s/target-shared' % dirname not in self._compile_graph):
'%s/target' % dirname not in self._compile_graph):
self._no_skip['syms'].remove(dirname)
add_category_rules('compile', compile_roots, self._compile_graph)
@ -1388,9 +1368,6 @@ class RecursiveMakeBackend(CommonBackend):
def _build_target_for_obj(self, obj):
if hasattr(obj, 'output_category') and obj.output_category:
target_name = obj.output_category
elif isinstance(obj, SharedLibrary):
assert obj.KIND == 'target'
target_name = 'target-shared'
else:
target_name = obj.KIND
return '%s/%s' % (mozpath.relpath(obj.objdir,