Skip to content

Commit 6003207

Browse files
author
Alan Jeffrey
committed
Update SpiderMonkey
1 parent 936f5bd commit 6003207

File tree

49,625 files changed

+2482621
-1074511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49,625 files changed

+2482621
-1074511
lines changed

mozjs/.cargo/config.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Note: if you add more configure substitutions here with required values
2+
# you will also need to fix the sed commands in:
3+
# taskcluster/scripts/builder/build-sm-mozjs-crate.sh
4+
# taskcluster/scripts/builder/build-sm-rust-bindings.sh
5+
6+
[source.crates-io]
7+
registry = 'https://github.com/rust-lang/crates.io-index'
8+
replace-with = 'vendored-sources'
9+
10+
[source."https://github.com/gankro/serde"]
11+
git = "https://github.com/gankro/serde"
12+
branch = "deserialize_from_enums4"
13+
replace-with = "vendored-sources"
14+
15+
[source.vendored-sources]
16+
directory = '@top_srcdir@/third_party/rust'
17+
18+
@WIN64_CARGO_LINKER_CONFIG@

mozjs/LICENSE

Lines changed: 7 additions & 371 deletions
Large diffs are not rendered by default.

mozjs/Makefile.in

Lines changed: 95 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ifndef MOZ_PROFILE_USE
4747
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
4848
# rules.mk doesn't run early enough.
4949
$(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BUILD_BACKEND_FILES)
50-
ifndef JS_STANDALONE
50+
ifdef MOZ_WIDGET_TOOLKIT
5151
ifdef COMPILE_ENVIRONMENT
5252
$(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
5353
endif
@@ -61,8 +61,7 @@ CLOBBER:
6161
else
6262
CLOBBER: $(topsrcdir)/CLOBBER
6363
@echo 'STOP! The CLOBBER file has changed.'
64-
@echo 'Please run the build through a sanctioned build wrapper, such as'
65-
@echo '"mach build" or client.mk.'
64+
@echo 'Please run the build through "mach build".'
6665
@exit 1
6766
endif
6867

@@ -96,42 +95,16 @@ ifndef TEST_MOZBUILD
9695
.PHONY: backend
9796
backend: $(BUILD_BACKEND_FILES)
9897

99-
# A traditional rule would look like this:
100-
# backend.%:
101-
# @echo do stuff
102-
#
103-
# But with -j<n>, and multiple items in BUILD_BACKEND_FILES, the command would
104-
# run multiple times in parallel.
105-
#
106-
# "Fortunately", make has some weird semantics for pattern rules: if there are
107-
# multiple targets in a pattern rule and each of them is matched at most once,
108-
# the command will only run once. So:
109-
# backend%RecursiveMakeBackend backend%FasterMakeBackend:
110-
# @echo do stuff
111-
# backend: backend.RecursiveMakeBackend backend.FasterMakeBackend
112-
# would only execute the command once.
113-
#
114-
# Credit where due: http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file/3077254#3077254
115-
$(subst .,%,$(BUILD_BACKEND_FILES)):
116-
@echo 'Build configuration changed. Regenerating backend.'
117-
$(PYTHON) config.status
98+
include $(topsrcdir)/build/rebuild-backend.mk
11899

119100
Makefile: $(BUILD_BACKEND_FILES)
120101
@$(TOUCH) $@
121102

122-
define build_backend_rule
123-
$(1)_files := $$(shell cat $(1).in)
124-
$(1): $$($(1)_files)
125-
$$($(1)_files):
126-
127-
endef
128-
$(foreach file,$(BUILD_BACKEND_FILES),$(eval $(call build_backend_rule,$(file))))
129-
130103
default:: $(BUILD_BACKEND_FILES)
131104
endif
132105

133106
install_manifests := \
134-
$(addprefix dist/,branding idl include public private sdk xpi-stage) \
107+
$(addprefix dist/,branding idl include public private xpi-stage) \
135108
_tests \
136109
$(NULL)
137110
# Skip the dist/bin install manifest when using the hybrid
@@ -148,7 +121,7 @@ install_manifest_depends = \
148121
$(BUILD_BACKEND_FILES) \
149122
$(NULL)
150123

151-
ifndef JS_STANDALONE
124+
ifdef MOZ_WIDGET_TOOLKIT
152125
ifdef COMPILE_ENVIRONMENT
153126
install_manifest_depends += \
154127
$(topsrcdir)/js/src/configure \
@@ -171,40 +144,40 @@ faster: install-dist/idl
171144
$(MAKE) -C faster FASTER_RECURSIVE_MAKE=1
172145
endif
173146

174-
# process_install_manifest needs to be invoked with --no-remove when building
175-
# js as standalone because automated builds are building nspr separately and
176-
# that would remove the resulting files.
177-
# Eventually, a standalone js build would just be able to build nspr itself,
178-
# removing the need for the former.
179-
ifdef JS_STANDALONE
180-
NO_REMOVE=1
147+
.PHONY: tup
148+
tup:
149+
$(call BUILDSTATUS,TIERS $(if $(MOZ_ARTIFACT_BUILDS),artifact )make tup)
150+
ifdef MOZ_ARTIFACT_BUILDS
151+
$(call BUILDSTATUS,TIER_START artifact)
152+
$(MAKE) recurse_artifact
153+
$(call BUILDSTATUS,TIER_FINISH artifact)
181154
endif
155+
$(call BUILDSTATUS,TIER_START make)
156+
$(MAKE) buildid.h source-repo.h
157+
$(call BUILDSTATUS,TIER_FINISH make)
158+
$(call BUILDSTATUS,TIER_START tup)
159+
@$(TUP) $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),,--verbose)
160+
$(call BUILDSTATUS,TIER_FINISH tup)
182161

183-
.PHONY: $(addprefix install-,$(subst /,_,$(install_manifests)))
162+
.PHONY: $(addprefix install-,$(install_manifests))
184163
$(addprefix install-,$(install_manifests)): install-%: $(install_manifest_depends)
185164
ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
186165
@# If we're using the hybrid FasterMake/RecursiveMake backend, we want
187166
@# to ensure the FasterMake end doesn't have install manifests for the
188167
@# same directory, because that would blow up
189168
$(if $(wildcard _build_manifests/install/$(subst /,_,$*)),$(if $(wildcard faster/install_$(subst /,_,$*)*),$(error FasterMake and RecursiveMake ends of the hybrid build system want to handle $*)))
190169
endif
191-
$(addprefix $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
170+
$(addprefix $(call py_action,process_install_manifest,--track install_$(subst /,_,$*).track $*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
192171

193172
# Dummy wrapper rule to allow the faster backend to piggy back
194173
$(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))): install-dist_%: install-dist/% ;
195174

196175
.PHONY: install-tests
197176
install-tests: install-test-files
198177

199-
# We no longer run "make install-tests" directly before running tests, but we still
200-
# want to depend on things like config.status, hence this target.
201-
.PHONY: run-tests-deps
202-
run-tests-deps: $(install_manifest_depends)
203-
204-
# Force --no-remove, because $objdir/_tests is handled by multiple manifests.
205178
.PHONY: install-test-files
206179
install-test-files:
207-
$(call py_action,process_install_manifest,--no-remove _tests _build_manifests/install/_test_files)
180+
$(call py_action,process_install_manifest,--track install__test_files.track _tests _build_manifests/install/_test_files)
208181

209182
include $(topsrcdir)/build/moz-automation.mk
210183

@@ -214,6 +187,9 @@ ifneq ($(filter-out maybe_clobber_profiledbuild,$(MAKECMDGOALS)),)
214187
GARBAGE_DIRS += dist _tests
215188
endif
216189

190+
# Dummy rule for the cases below where we don't depend on dist/include
191+
recurse_pre-export::
192+
217193
# Windows PGO builds don't perform a clean before the 2nd pass. So, we want
218194
# to preserve content for the 2nd pass on Windows. Everywhere else, we always
219195
# process the install manifests as part of export.
@@ -224,23 +200,19 @@ ifndef NO_PROFILE_GUIDED_OPTIMIZE
224200
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
225201
recurse_pre-export:: install-manifests
226202
binaries::
227-
@$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
203+
@$(MAKE) install-manifests install_manifests=dist/include
228204
endif
229205
endif
230206
else # !MOZ_PROFILE_USE (normal build)
231207
recurse_pre-export:: install-manifests
232208
binaries::
233-
@$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
209+
@$(MAKE) install-manifests install_manifests=dist/include
234210
endif
235211

236-
# For historical reasons that are unknown, $(DIST)/sdk is always blown away
237-
# with no regard for PGO passes. This decision could probably be revisited.
238-
recurse_pre-export:: install-dist/sdk
239-
240212
recurse_artifact:
241213
$(topsrcdir)/mach --log-no-times artifact install
242214

243-
ifndef JS_STANDALONE
215+
ifdef MOZ_WIDGET_TOOLKIT
244216
ifdef ENABLE_TESTS
245217
# Additional makefile targets to call automated test suites
246218
include $(topsrcdir)/testing/testsuite-targets.mk
@@ -250,108 +222,97 @@ endif
250222
default all::
251223
$(call BUILDSTATUS,TIERS $(TIERS) $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS)))
252224

253-
include $(topsrcdir)/config/rules.mk
225+
# PGO build target.
226+
profiledbuild::
227+
$(call BUILDSTATUS,TIERS pgo_profile_generate pgo_package pgo_profile pgo_clobber pgo_profile_use)
228+
$(call BUILDSTATUS,TIER_START pgo_profile_generate)
229+
$(MAKE) default MOZ_PROFILE_GENERATE=1 MOZ_PGO_INSTRUMENTED=1
230+
$(call BUILDSTATUS,TIER_FINISH pgo_profile_generate)
231+
$(call BUILDSTATUS,TIER_START pgo_package)
232+
$(MAKE) package MOZ_PGO_INSTRUMENTED=1 MOZ_INTERNAL_SIGNING_FORMAT= MOZ_EXTERNAL_SIGNING_FORMAT=
233+
rm -f jarlog/en-US.log
234+
$(call BUILDSTATUS,TIER_FINISH pgo_package)
235+
$(call BUILDSTATUS,TIER_START pgo_profile)
236+
MOZ_PGO_INSTRUMENTED=1 JARLOG_FILE=jarlog/en-US.log $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py 10
237+
$(call BUILDSTATUS,TIER_FINISH pgo_profile)
238+
$(call BUILDSTATUS,TIER_START pgo_clobber)
239+
$(MAKE) maybe_clobber_profiledbuild
240+
$(call BUILDSTATUS,TIER_FINISH pgo_clobber)
241+
$(call BUILDSTATUS,TIER_START pgo_profile_use)
242+
$(MAKE) default MOZ_PROFILE_USE=1
243+
$(call BUILDSTATUS,TIER_FINISH pgo_profile_use)
244+
245+
# Change default target to PGO build if PGO is enabled.
246+
ifdef MOZ_PGO
247+
OVERRIDE_DEFAULT_GOAL := profiledbuild
248+
endif
254249

255-
distclean::
256-
$(RM) $(DIST_GARBAGE)
250+
include $(topsrcdir)/config/rules.mk
257251

258-
ifeq ($(OS_ARCH),WINNT)
259-
# we want to copy PDB files on Windows
260-
MAKE_SYM_STORE_ARGS := -c --vcs-info
261-
ifdef PDBSTR_PATH
262-
MAKE_SYM_STORE_ARGS += -i
263-
endif
264-
ifdef MSVC_HAS_DIA_SDK
265-
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms.exe
266-
else
267-
DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms_vc$(_MSC_VER).exe
268-
endif
269-
# PDB files don't get moved to dist, so we need to scan the whole objdir
270-
MAKE_SYM_STORE_PATH := .
271-
endif
272-
ifeq ($(OS_ARCH),Darwin)
273-
# need to pass arch flags for universal builds
274-
ifdef UNIVERSAL_BINARY
275-
MAKE_SYM_STORE_ARGS := -c -a 'i386 x86_64' --vcs-info
276-
MAKE_SYM_STORE_PATH := $(DIST)/universal
277-
else
278-
MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
279-
MAKE_SYM_STORE_PATH := $(DIST)/bin
280-
endif
281-
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
252+
ifdef SCCACHE_VERBOSE_STATS
253+
default::
254+
-$(CCACHE) --show-stats --stats-format=json > sccache-stats.json
255+
@echo "===SCCACHE STATS==="
256+
-$(CCACHE) --show-stats
257+
@echo "==================="
258+
ifndef MOZ_PROFILE_GENERATE
259+
# Ideally we'd do that in the same file as we set the sccache.log location for
260+
# sccache, but it's too late in the build.
261+
-gzip -9 $(DIST)/sccache.log
282262
endif
283-
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
284-
MAKE_SYM_STORE_ARGS := -c --vcs-info
285-
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
286-
MAKE_SYM_STORE_PATH := $(DIST)/bin
287263
endif
288-
MAKE_SYM_STORE_ARGS += --install-manifest=$(DEPTH)/_build_manifests/install/dist_include,$(DIST)/include
289264

290-
SYM_STORE_SOURCE_DIRS := $(topsrcdir)
265+
distclean::
266+
$(RM) $(DIST_GARBAGE)
291267

292268
ifdef MOZ_CRASHREPORTER
293269
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
294270

295-
SYMBOL_INDEX_NAME = \
296-
$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_TARGET)-$(BUILDID)-$(CPU_ARCH)-symbols.txt
297271
endif
298272

299-
buildsymbols:
300-
ifdef MOZ_CRASHREPORTER
301-
echo building symbol store
302-
$(RM) -r $(DIST)/crashreporter-symbols
303-
$(RM) '$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip'
304-
$(RM) '$(DIST)/$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
305-
$(NSINSTALL) -D $(DIST)/crashreporter-symbols
306-
OBJCOPY='$(OBJCOPY)' \
307-
$(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
308-
$(MAKE_SYM_STORE_ARGS) \
309-
$(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
310-
$(DUMP_SYMS_BIN) \
311-
$(DIST)/crashreporter-symbols \
312-
$(MAKE_SYM_STORE_PATH) | grep -iv test > \
313-
$(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
273+
.PHONY: prepsymbolsarchive
274+
prepsymbolsarchive:
314275
echo packing symbols
315276
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
316-
cd $(DIST)/crashreporter-symbols && \
317-
zip -r5D '../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' . -x '*test*' -x '*Test*'
318-
cd $(DIST)/crashreporter-symbols && \
319-
grep 'sym' $(SYMBOL_INDEX_NAME) > $(SYMBOL_INDEX_NAME).tmp && \
320-
mv $(SYMBOL_INDEX_NAME).tmp $(SYMBOL_INDEX_NAME)
321-
cd $(DIST)/crashreporter-symbols && \
322-
zip -r5D '../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' . -i '*.sym' -i '*.txt' -x '*test*' -x '*Test*'
323-
endif # MOZ_CRASHREPORTER
277+
278+
ifndef MOZ_AUTOMATION
279+
prepsymbolsarchive: recurse_syms
280+
endif
281+
282+
.PHONY: symbolsfullarchive
283+
symbolsfullarchive: prepsymbolsarchive
284+
$(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
285+
$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' \
286+
$(abspath $(DIST)/crashreporter-symbols) \
287+
--exclude '*test*' \
288+
--exclude '*Test*' \
289+
--compress '**/*.sym')
290+
291+
.PHONY: symbolsarchive
292+
symbolsarchive: prepsymbolsarchive
293+
$(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip'
294+
$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \
295+
$(abspath $(DIST)/crashreporter-symbols) \
296+
--include '**/*.sym')
297+
298+
ifdef MOZ_CRASHREPORTER
299+
buildsymbols: symbolsfullarchive symbolsarchive
300+
else
301+
buildsymbols:
302+
endif
324303

325304
uploadsymbols:
326305
ifdef MOZ_CRASHREPORTER
327-
ifdef SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE
328306
$(PYTHON) -u $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.py '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
329307
endif
330-
endif
331308

332309
.PHONY: update-packaging
333310
update-packaging:
334311
$(MAKE) -C tools/update-packaging
335312

336-
.PHONY: pretty-package
337-
pretty-package:
338-
unset MOZ_SIGN_CMD && $(MAKE) package MOZ_PKG_PRETTYNAMES=1
339-
340-
.PHONY: pretty-package-tests
341-
pretty-package-tests:
342-
unset MOZ_SIGN_CMD && $(MAKE) package-tests MOZ_PKG_PRETTYNAMES=1
343-
344-
.PHONY: pretty-l10n-check
345-
pretty-l10n-check:
346-
unset MOZ_SIGN_CMD && $(MAKE) l10n-check MOZ_PKG_PRETTYNAMES=1
347-
348-
.PHONY: pretty-update-packaging
349-
pretty-update-packaging:
350-
unset MOZ_SIGN_CMD && $(MAKE) -C tools/update-packaging MOZ_PKG_PRETTYNAMES=1
351-
352-
.PHONY: pretty-installer
353-
pretty-installer:
354-
unset MOZ_SIGN_CMD && $(MAKE) installer MOZ_PKG_PRETTYNAMES=1
313+
.PHONY: package-generated-sources
314+
package-generated-sources:
315+
$(call py_action,package_generated_sources,'$(DIST)/$(PKG_PATH)$(GENERATED_SOURCE_FILE_PACKAGE)')
355316

356317
#XXX: this is a hack, since we don't want to clobber for MSVC
357318
# PGO support, but we can't do this test in client.mk

mozjs/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
This directory contains SpiderMonkey 50.
1+
This directory contains SpiderMonkey 60.
22

3-
This release is based on a revision of Mozilla 50:
4-
http://hg.mozilla.org/releases/
3+
This release is based on a revision of Mozilla 60:
4+
https://hg.mozilla.org/releases/
55
The changes in the patches/ directory were applied.
66

7-
MDN hosts the latest SpiderMonkey 50 release notes:
8-
https://developer.mozilla.org/en-US/docs/SpiderMonkey/50
7+
MDN hosts the latest SpiderMonkey 60 release notes:
8+
https://developer.mozilla.org/en-US/docs/SpiderMonkey/60

mozjs/build/.gdbinit_python.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#filter substitution
22
python
33
import sys
4-
sys.path.append('@topsrcdir@/python/gdbpp')
4+
sys.path.append('@topsrcdir@/third_party/python/gdbpp')
55
import gdbpp
66
end

0 commit comments

Comments
 (0)