Bug 1298328 - Fix dependency between buildid.h and libxul, do not re-generate buildid.h for every developer build. r=ted

For automation builds, force buildid.h to be regenerated, and always
#include buildid.h in nsAppRunner.cpp. This will eliminate the mismatch at the
cost of re-linking libxul on every build.

For developer builds, always #include buildid.h in nsAppRunner.cpp, but do not
force buildid.h to be re-generated for incremental builds. This means we will
never have a mismatch between platform and application buildids, although
subsequent builds are no longer guaranteed to have a new buildid.

MozReview-Commit-ID: 19hvu8AQXgN

--HG--
extra : rebase_source : 181b53c2cc47526bd632a0931ba6e65fc74179ef
This commit is contained in:
Chris Manchester 2018-03-07 13:45:12 -08:00
Родитель 2a879cf128
Коммит 506c15d221
3 изменённых файлов: 5 добавлений и 26 удалений

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

@ -31,8 +31,13 @@ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
.mozconfig.mk
ifndef MOZ_PROFILE_USE
# Automation builds should always have a new buildid, but for the sake of not
# re-linking libxul on every incremental build we do not enforce this for
# developer builds.
ifneq (,$(MOZ_AUTOMATION)$(MOZ_BUILD_DATE))
buildid.h source-repo.h: FORCE
endif
endif
ifdef JS_STANDALONE
configure_dir = $(topsrcdir)/js/src

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

@ -1,21 +0,0 @@
# -*- makefile -*-
# vim:set ts=8 sw=8 sts=8 noet:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
milestone_txt = $(topsrcdir)/config/milestone.txt
include $(topsrcdir)/config/rules.mk
MOZ_BUILDID := $(shell awk '{print $$3}' $(DEPTH)/buildid.h)
$(call errorIfEmpty,GRE_MILESTONE MOZ_BUILDID)
MK_COMPILE_DEFINES = -DMOZ_BUILDID=$(MOZ_BUILDID)
# Note these dependencies are broken because the target is *not* the cpp file.
# BUT, actually fixing it would make libxul rebuilt on every single incremental
# build because of the automatic buildid change. This is why we can't actually
# include buildid.h there, because it would add the dependency.
$(srcdir)/nsAppRunner.cpp: $(DEPTH)/buildid.h $(milestone_txt)

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

@ -271,12 +271,7 @@ nsString gAbsoluteArgv0Path;
#include <fontconfig/fontconfig.h>
#endif
#include "BinaryPath.h"
#ifndef MOZ_BUILDID
// See comment in Makefile.in why we want to avoid including buildid.h.
// Still include it when MOZ_BUILDID is not set, which can happen with some
// build backends.
#include "buildid.h"
#endif
#ifdef MOZ_LINKER
extern "C" MFBT_API bool IsSignalHandlingBroken();