Bill Gianopoulos 3 years ago
parent
commit
217dc36265
2 changed files with 38 additions and 129 deletions
  1. 22 40
      bug1240930-253/mozilla/1429875-4-61a1.patch
  2. 16 89
      bug1240930-253/mozilla/1429875-5-61a1.patch

+ 22 - 40
bug1240930-253/mozilla/1429875-4-61a1.patch

@@ -674,7 +674,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  ifdef HOST_LIBRARY_NAME
  HOST_LIBRARY		:= $(LIB_PREFIX)$(HOST_LIBRARY_NAME).$(LIB_SUFFIX)
  endif
-@@ -434,32 +433,35 @@ ECHO := true
+@@ -426,32 +425,35 @@ ECHO := true
  QUIET := -q
  endif
  
@@ -713,7 +713,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  ##############################################
  ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
  ifdef MOZ_PROFILE_USE
-@@ -533,36 +535,35 @@ distclean::
+@@ -525,35 +527,35 @@ distclean::
  	$(wildcard *.$(LIB_SUFFIX)) $(wildcard *$(DLL_SUFFIX)) \
  	$(wildcard *.$(IMPORT_LIB_SUFFIX))
  
@@ -742,18 +742,17 @@ diff --git a/config/rules.mk b/config/rules.mk
  	$(REPORT_BUILD)
  	@$(RM) $@.manifest
  ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
--
-+	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
+-	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
++	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS
  ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
+ 	       if test -f '$(srcdir)/$(notdir $@).manifest'; then \
+                        echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
+                        $(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
  		else \
  			echo 'Embedding manifest from $@.manifest'; \
  			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-@@ -573,140 +574,133 @@ ifdef MSMANIFEST_TOOL
+ 		fi; \
+@@ -563,140 +565,133 @@ ifdef MSMANIFEST_TOOL
  	fi
  endif	# MSVC with manifest tool
  ifdef MOZ_PROFILE_GENERATE
@@ -762,7 +761,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  	touch -t `date +%Y%m%d%H%M.%S -d 'now+5seconds'` pgo.relink
  endif
  else # !WINNT || GNU_CC
--	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+-	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
 +	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
  	$(call py_action,check_binary,--target $@)
  endif # WINNT && !GNU_CC
@@ -818,7 +817,7 @@ diff --git a/config/rules.mk b/config/rules.mk
 +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
  	$(REPORT_BUILD)
  ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(EXPAND_LINK) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
+-	$(EXPAND_LINK) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 +	$(LINKER) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
  ifdef MSMANIFEST_TOOL
  	@if test -f $@.manifest; then \
@@ -827,7 +826,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  	fi
  endif	# MSVC with manifest tool
  else
--	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+-	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS)
 +	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
  	$(call py_action,check_binary,--target $@)
  endif # WINNT && !GNU_CC
@@ -857,20 +856,20 @@ diff --git a/config/rules.mk b/config/rules.mk
  	$(call py_action,check_binary,--host $@)
  endif
  
--$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+-$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(STATIC_LIBS_DEPS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS)) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 +$(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
  	$(REPORT_BUILD)
 -# Always remove both library and library descriptor
 -	$(RM) $(REAL_LIBRARY) $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
--	$(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(STATIC_LIBS)
+-	$(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(STATIC_LIBS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS))
 -
--$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+-$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(STATIC_LIBS_DEPS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS)) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 -# When we only build a library descriptor, blow out any existing library
 -	$(REPORT_BUILD)
 -	$(if $(filter %.$(LIB_SUFFIX),$(LIBRARY)),,$(RM) $(REAL_LIBRARY))
--	$(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(STATIC_LIBS)
+-	$(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(STATIC_LIBS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS))
 +	$(RM) $(REAL_LIBRARY)
-+	$(AR) $(AR_FLAGS) $(OBJS) $($@_OBJS)
++       $(AR) $(AR_FLAGS) $(OBJS) $($@_OBJS)
  
  ifeq ($(OS_ARCH),WINNT)
  # Import libraries are created by the rules creating shared libraries.
@@ -900,7 +899,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  ifndef INCREMENTAL_LINKER
  	$(RM) $@
  endif
--	$(EXPAND_MKSHLIB) $(OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
+-	$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(SHLIB_LDENDFILE)
 +	$(MKSHLIB) $($@_OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
  	$(call py_action,check_binary,--target $@)
  
@@ -1358,24 +1357,7 @@ deleted file mode 100644
 diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
 --- a/python/mozbuild/mozbuild/backend/common.py
 +++ b/python/mozbuild/mozbuild/backend/common.py
-@@ -22,30 +22,37 @@ from mozbuild.frontend.data import (
-     BaseProgram,
-     ChromeManifestEntry,
-     ConfigFileSubstitution,
-     Exports,
-     FinalTargetPreprocessedFiles,
-     FinalTargetFiles,
-     GeneratedSources,
-     GnProjectData,
-+    HostLibrary,
-+    HostRustLibrary,
-     IPDLCollection,
-+    RustLibrary,
-     SharedLibrary,
-+    StaticLibrary,
-     UnifiedSources,
-     XPIDLFile,
-     WebIDLCollection,
+@@ -42,17 +42,20 @@ from mozbuild.frontend.data import (
  )
  from mozbuild.jar import (
      DeprecatedJarManifest,
@@ -1397,7 +1379,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
          self.topsrcdir = config.topsrcdir
          self.topobjdir = config.topobjdir
  
-@@ -191,16 +198,97 @@ class CommonBackend(BuildBackend):
+@@ -349,16 +352,97 @@ class CommonBackend(BuildBackend):
  
          # Write out a file listing generated sources.
          with self._write_file(mozpath.join(topobjdir, 'generated-sources.json')) as fh:
@@ -1491,10 +1473,10 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
          self._generated_sources.update(mozpath.relpath(f, self.environment.topobjdir) for f in files)
  
      def _handle_webidl_collection(self, webidls):
+         if not webidls.all_stems():
+             return
  
          bindings_dir = mozpath.join(self.environment.topobjdir, 'dom', 'bindings')
- 
-         all_inputs = set(webidls.all_static_sources())
 diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
 --- a/python/mozbuild/mozbuild/backend/recursivemake.py
 +++ b/python/mozbuild/mozbuild/backend/recursivemake.py

+ 16 - 89
bug1240930-253/mozilla/1429875-5-61a1.patch

@@ -10,7 +10,7 @@ MozReview-Commit-ID: 8PtgxfbxuE
 diff --git a/config/config.mk b/config/config.mk
 --- a/config/config.mk
 +++ b/config/config.mk
-@@ -415,25 +415,28 @@ endif
+@@ -436,25 +436,28 @@ endif
  
  # MDDEPDIR is the subdirectory where dependency files are stored
  MDDEPDIR := .deps
@@ -43,7 +43,7 @@ diff --git a/config/config.mk b/config/config.mk
 diff --git a/config/rules.mk b/config/rules.mk
 --- a/config/rules.mk
 +++ b/config/rules.mk
-@@ -553,17 +553,17 @@ endif
+@@ -545,17 +545,17 @@ endif
  #
  # PROGRAM = Foo
  # creates OBJS, links with LIBS to create Foo
@@ -52,17 +52,17 @@ diff --git a/config/rules.mk b/config/rules.mk
  	$(REPORT_BUILD)
  	@$(RM) $@.manifest
  ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
+-	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS
 +	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
  ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
+ 	       if test -f '$(srcdir)/$(notdir $@).manifest'; then \
+                        echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
+                        $(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
  		else \
  			echo 'Embedding manifest from $@.manifest'; \
  			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-@@ -574,17 +574,17 @@ ifdef MSMANIFEST_TOOL
+ 		fi; \
+@@ -565,17 +565,17 @@ ifdef MSMANIFEST_TOOL
  	fi
  endif	# MSVC with manifest tool
  ifdef MOZ_PROFILE_GENERATE
@@ -81,7 +81,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  endif
  ifdef MOZ_POST_PROGRAM_COMMAND
  	$(MOZ_POST_PROGRAM_COMMAND) $@
-@@ -625,25 +625,25 @@ endif
+@@ -616,25 +616,25 @@ endif
  # Foo.o (from either Foo.c or Foo.cpp).
  #
  # SIMPLE_PROGRAMS = Foo Bar
@@ -109,7 +109,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  endif
  ifdef MOZ_POST_PROGRAM_COMMAND
  	$(MOZ_POST_PROGRAM_COMMAND) $@
-@@ -662,17 +662,17 @@ endif
+@@ -653,17 +653,17 @@ endif
  endif
  ifndef CROSS_COMPILE
  	$(call py_action,check_binary,--host $@)
@@ -118,7 +118,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  $(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
  	$(REPORT_BUILD)
  	$(RM) $(REAL_LIBRARY)
--	$(AR) $(AR_FLAGS) $(OBJS) $($@_OBJS)
+-       $(AR) $(AR_FLAGS) $(OBJS) $($@_OBJS)
 +	$(AR) $(AR_FLAGS) $(OBJS) $($@_$(OBJS_VAR_SUFFIX))
  
  ifeq ($(OS_ARCH),WINNT)
@@ -128,7 +128,7 @@ diff --git a/config/rules.mk b/config/rules.mk
  # when rebuilding the corresponding shared library. Defining an empty recipe
  # for import libraries forces make to wait for the shared library recipe to
  # have run before considering other targets that depend on the import library.
-@@ -690,17 +690,17 @@ endif
+@@ -681,17 +681,17 @@ endif
  # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
  # so no need to conditionalize on OS version or debugging format.
  
@@ -150,7 +150,7 @@ diff --git a/config/rules.mk b/config/rules.mk
 diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
 --- a/python/mozbuild/mozbuild/backend/common.py
 +++ b/python/mozbuild/mozbuild/backend/common.py
-@@ -203,25 +203,31 @@ class CommonBackend(BuildBackend):
+@@ -357,25 +357,31 @@ class CommonBackend(BuildBackend):
              }
              json.dump(d, fh, sort_keys=True, indent=4)
  
@@ -182,7 +182,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
                      recurse_objs = False
                  elif recurse_objs:
                      add_objs(lib)
-@@ -253,17 +259,17 @@ class CommonBackend(BuildBackend):
+@@ -407,17 +413,17 @@ class CommonBackend(BuildBackend):
                      seen_libs.add(lib)
                      shared_libs.append(lib)
  
@@ -204,7 +204,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
 diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
 --- a/python/mozbuild/mozbuild/backend/recursivemake.py
 +++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1315,43 +1315,78 @@ class RecursiveMakeBackend(CommonBackend
+@@ -1281,43 +1281,78 @@ class RecursiveMakeBackend(CommonBackend
          def pretty_relpath(lib):
              return '$(DEPTH)/%s' % mozpath.relpath(lib.objdir, topobjdir)
  
@@ -292,7 +292,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
 diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
 --- a/python/mozbuild/mozbuild/frontend/data.py
 +++ b/python/mozbuild/mozbuild/frontend/data.py
-@@ -383,26 +383,30 @@ class LinkageMultipleRustLibrariesError(
+@@ -347,16 +347,18 @@ class LinkageMultipleRustLibrariesError(
  
  class Linkable(ContextDerived):
      """Generic context derived container object for programs and libraries"""
@@ -303,7 +303,6 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
          'linked_system_libs',
 +        'no_pgo_sources',
 +        'no_pgo',
-         'sources',
      )
  
      def __init__(self, context):
@@ -312,75 +311,3 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
          self.linked_libraries = []
          self.linked_system_libs = []
          self.lib_defines = Defines(context, {})
-         self.sources = defaultdict(list)
-+        self.no_pgo_sources = []
-+        self.no_pgo = False
- 
-     def link_library(self, obj):
-         assert isinstance(obj, BaseLibrary)
-         if obj.KIND != self.KIND:
-             raise LinkageWrongKindError('%s != %s' % (obj.KIND, self.KIND))
-         # Linking multiple Rust libraries into an object would result in
-         # multiple copies of the Rust standard library, as well as linking
-         # errors from duplicate symbols.
-@@ -432,26 +436,33 @@ class Linkable(ContextDerived):
-     def source_files(self):
-         all_sources = []
-         # This is ordered for reproducibility and consistently w/
-         # config/rules.mk
-         for suffix in ('.c', '.S', '.cpp', '.m', '.mm', '.s'):
-             all_sources += self.sources.get(suffix, [])
-         return all_sources
- 
--    @property
--    def objs(self):
-+    def _get_objs(self, sources):
-         obj_prefix = ''
-         if self.KIND == 'host':
-             obj_prefix = 'host_'
- 
-         return [mozpath.join(self.objdir, '%s%s.%s' % (obj_prefix,
-                                                        mozpath.splitext(mozpath.basename(f))[0],
-                                                        self.config.substs.get('OBJ_SUFFIX', '')))
--                for f in self.source_files()]
-+                for f in sources]
-+
-+    @property
-+    def no_pgo_objs(self):
-+        return self._get_objs(self.no_pgo_sources)
-+
-+    @property
-+    def objs(self):
-+        return self._get_objs(self.source_files())
- 
- 
- class BaseProgram(Linkable):
-     """Context derived container object for programs, which is a unicode
-     string.
- 
-     This class handles automatically appending a binary suffix to the program
-     name.
-diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
---- a/python/mozbuild/mozbuild/frontend/emitter.py
-+++ b/python/mozbuild/mozbuild/frontend/emitter.py
-@@ -946,16 +946,20 @@ class TreeMetadataEmitter(LoggingMixin):
-                     ctxt_sources[variable][canonical_suffix] += sorted(srcs)
-                     yield obj
- 
-         if ctxt_sources:
-             for linkable in linkables:
-                 for target_var in ('SOURCES', 'UNIFIED_SOURCES'):
-                     for suffix, srcs in ctxt_sources[target_var].items():
-                         linkable.sources[suffix] += srcs
-+                if no_pgo_sources:
-+                    linkable.no_pgo_sources = no_pgo_sources
-+                elif no_pgo:
-+                    linkable.no_pgo = True
-             for host_linkable in host_linkables:
-                 for suffix, srcs in ctxt_sources['HOST_SOURCES'].items():
-                     host_linkable.sources[suffix] += srcs
- 
-         for f, flags in all_flags.iteritems():
-             if flags.flags:
-                 ext = mozpath.splitext(f)[1]
-                 yield PerSourceFlag(context, f, flags.flags)