Commit Graph

9358 Commits

Author SHA1 Message Date
Simon Giesecke
d1ed75b2b4 Bug 1626555 - Make dom/simpledb buildable outside of unified-build environment. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94079
2020-10-21 13:18:15 +00:00
Simon Giesecke
7c4e805a15 Bug 1626555 - Add dom/indexedDB to the list of non-unified-build-compatible directories. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94040
2020-10-21 13:17:31 +00:00
Simon Giesecke
f70bfd33ed Bug 1626555 - Make dom/localstorage buildable outside of unified-build environment. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94034
2020-10-21 13:17:18 +00:00
Simon Giesecke
2282fb5a6a Bug 1626555 - Make dom/quota buildable outside of unified-build environment. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94011
2020-10-21 13:16:19 +00:00
Andi-Bogdan Postelnicu
85c179d8f3 Bug 1671641 - Make dom/fetch buildable outside of unified-build environment. r=sg
Depends on D93998

Differential Revision: https://phabricator.services.mozilla.com/D94015
2020-10-21 08:00:18 +00:00
Andi-Bogdan Postelnicu
c954c55398 Bug 1671641 - Make dom/events buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93998
2020-10-21 08:00:18 +00:00
Andi-Bogdan Postelnicu
bb35771d56 Bug 1671641 - Add dom/docs and dom/encoding to whitelist for non-unified build. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93992
2020-10-21 08:00:17 +00:00
Andi-Bogdan Postelnicu
1ce4fd33cb Bug 1671641 - Add dom/debugger to whitelist for non-unified build. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93921
2020-10-21 08:00:17 +00:00
Andi-Bogdan Postelnicu
868134e958 Bug 1671641 - Add dom/crypto to whitelist for non-unified build. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93804
2020-10-21 08:00:17 +00:00
Andi-Bogdan Postelnicu
8dee6add0c Bug 1671641 - Add componets from dom that are non-unified build compatible to the whitelist. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93801
2020-10-21 08:00:16 +00:00
Andi-Bogdan Postelnicu
ff648dd64e Bug 1671641 - Add dom/credentialmanagement to whitelist for non-unified build. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93800
2020-10-21 08:00:16 +00:00
Andi-Bogdan Postelnicu
6c3bfe9d82 Bug 1671641 - Make dom/console buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93796
2020-10-21 08:00:16 +00:00
Andi-Bogdan Postelnicu
bb7a0e9a8f Bug 1671641 - Make dom/commandhandler buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93795
2020-10-21 08:00:16 +00:00
Andi-Bogdan Postelnicu
4d162f7eef Bug 1671641 - Make dom/clients buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93793
2020-10-21 08:00:15 +00:00
Andi-Bogdan Postelnicu
e872071d08 Bug 1671599 - Make dom/canvas buildable outside of unified-build environment. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D93753
2020-10-20 13:14:51 +00:00
Andi-Bogdan Postelnicu
7c4670b83d Bug 1671380 - Make dom/cache buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93642
2020-10-21 07:59:44 +00:00
Andi-Bogdan Postelnicu
b623ec4803 Bug 1626584 - Make dom/bindings buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93641
2020-10-16 15:04:52 +00:00
Andi-Bogdan Postelnicu
2f17c5961e Bug 1626555 - Make dom/base buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93640
2020-10-19 12:18:01 +00:00
Mike Hommey
5c05913d21 Bug 1495733 - Fix elfhack for files > 2GiB and < 4GiB. r=gsvelto
This only solves the easy half of the problem outlined in the bug,
leaving the other half for later.

iostream::tellg() actually returns streampos, which is able to support
files larger than 4GiB with libstdc++, but converting to an int
obviously truncated that, as well as transformed values between 2GiB and
4GiB into invalid negative numbers.

iostream::seekg() also takes a streampos, so storing the streampos as-is
is enough to address the problem with tellg()/seekg() sequences.

The other half of the problem involves elfhack converting 64-bits ELF
headers to 32-bits headers internally, which requires deeper changes.

This change however, is enough to support files up to 4GiB, which is
already a good first step.

Differential Revision: https://phabricator.services.mozilla.com/D94252
2020-10-21 07:30:38 +00:00
Mike Hommey
6504260166 Bug 1672306 - Don't enable rust "global" LTO when cross LTO is enabled. r=firefox-build-system-reviewers,dmajor
This avoids a sort of duplication of work between both, because the
linker will eventually LTO-compile everything, so we technically don't
really need the extra step of the rust compiler doing an intermediate
LTO on the static libraries it produces.

Differential Revision: https://phabricator.services.mozilla.com/D94224
2020-10-21 01:20:48 +00:00
J.C. Jones
f3f86339c2 Bug 1671713 - land NSS 58dc3216d518 UPGRADE_NSS_RELEASE, r=kjacobs
2020-10-13  Mike Hommey  <mh@glandium.org>

	* lib/freebl/freebl.gyp:
	Bug 1670839 - Use ARM crypto extension for AES, SHA1 and SHA2 on
	mac. r=kjacobs

	AFAICT, the Makefile equivalent already does.

	[58dc3216d518] [tip]

	* lib/freebl/sha1-armv8.c:
	Bug 1670839 - Only build sha1-armv8.c code when USE_HW_SHA1 is
	defined. r=kjacobs

	This matches what is done in sha256-armv8.c, and avoids
	inconsistency with sha1-fast.c, which will define the same functions
	in the case USE_HW_SHA1 is not defined.

	[54be084e3ba8]

2020-10-16  J.C. Jones  <jjones@mozilla.com>

	* automation/abi-check/expected-report-libnss3.so.txt, automation/abi-
	check/previous-nss-release, lib/nss/nss.h, lib/softoken/softkver.h,
	lib/util/nssutil.h:
	Set version numbers to 3.59 Beta
	[d4b21706e432]

Differential Revision: https://phabricator.services.mozilla.com/D94070
2020-10-20 14:39:49 +00:00
Valentin Gosu
75e57b5355 Bug 1672127 - Fix browser_fall_back_to_https.js to use actual host r=ckerschb
Adds secureonly.example.com:443 to server-locations.txt - this host is only available on HTTPS.
Regenerates certs using `./mach python build/pgo/genpgocert.py` command.
Sets network.dns.native-is-localhost pref in test so we don't trigger assertion.

Differential Revision: https://phabricator.services.mozilla.com/D94005
2020-10-20 10:26:41 +00:00
Valentin Gosu
db3e003790 Bug 1672115 - Fix genpgocert.py r=keeler
Error:
```
$ ./mach python build/pgo/genpgocert.py
Traceback (most recent call last):
  File "build/pgo/genpgocert.py", line 208, in <module>
    certificateStatus = constructCertDatabase(build, certdir)
  File "build/pgo/genpgocert.py", line 99, in constructCertDatabase
    openssl = distutils.spawn.find_executable("openssl")
AttributeError: module 'distutils' has no attribute 'spawn'
```

Differential Revision: https://phabricator.services.mozilla.com/D94006
2020-10-20 08:34:02 +00:00
Mike Hommey
5afb69830c Bug 1670156 - Use the same prefix/suffix for rust libraries on mingw builds. r=firefox-build-system-reviewers,dmajor
Rustc >= 1.44 changed the file names of the static libraries it
produces with -windows-gnu targets, to match that of mingw clang/gcc.

Considering we still build on 1.43, the best fix would be to derive the
prefix/suffix based on the version of rust, but that actually turns into
a hard-to-solve problem because of configure tests for bindgen also
depending on the prefix/suffix value to be known.

On the other hand, we're soon due to an update to 1.47, so the simpler
solution is to just push mingw builds to require 1.44 (settling for the
smallest upgrade possible for now) and to remove the split between C and
rust library prefix/suffixes.

Differential Revision: https://phabricator.services.mozilla.com/D93726
2020-10-16 16:06:19 +00:00
Mike Hommey
19c21c31d2 Bug 1669934 - Unset __PYVENV_LAUNCHER__ before reexecuting python configure in the virtualenv. r=firefox-build-system-reviewers,andi,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D93627
2020-10-15 21:30:23 +00:00
Ricky Stewart
362abcf949 Bug 1670357 - Remove make targets for cleaning: clean, realclean, clobber, distclean, clobber_all, everything r=firefox-build-system-reviewers,mhentges
The `clobber` targets are superseded by `mach clobber`, so we don't need them for any reason. The `clean` target is meant to get you to a post-`configure` state, but it doesn't really work, and if it's necessary for you to be in that state for some reason you can just clobber and re-`configure`, so it doesn't seem worth it to get it working again. Instead, delete all of them. Also delete `everything` which is not useful when `clobber` doesn't exist.

Differential Revision: https://phabricator.services.mozilla.com/D93514
2020-10-15 20:37:18 +00:00
Andi-Bogdan Postelnicu
b7e337ee5d Bug 1626532 - Make dom/animation buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93635
2020-10-15 10:05:07 +00:00
Ricky Stewart
d8915aa0c8 Bug 1670167 - Fix janky Python 3 logic in configure from bug 1656993 r=firefox-build-system-reviewers,glandium
The `try : import mozfile; except ImportError: ...` thing was completely broken since it unconditionally triggered [this exception](https://searchfox.org/mozilla-central/rev/165e8d8f80c02605c2f3e89c5de462abfce91c32/python/mozbuild/mozbuild/configure/__init__.py#248). The `MOZBUILD_VIRTUALENV` thing should work now, so just use that as a signal for whether we're already in the `virtualenv` instead.

Also delete some `PATH` munging in `building.py`, which I think should be unnecessary after we make the above change.

Differential Revision: https://phabricator.services.mozilla.com/D93138
2020-10-13 16:05:51 +00:00
Razvan Maries
5fa72e54df Backed out 2 changesets (bug 1440203) for causing bug 1670277. CLOSED TREE
Backed out changeset 0b10bf76fe35 (bug 1440203)
Backed out changeset 468878422866 (bug 1440203)
2020-10-10 03:39:33 +03:00
Mike Hommey
0eb4a07d1d Bug 1670167 - Unset PYTHONEXECUTABLE once python configure has been reexecuted in the virtualenv. r=firefox-build-system-reviewers,andi,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D93061
2020-10-09 14:27:03 +00:00
Jed Davis
3680ce4b19 Bug 1440203 - Support memfd_create in IPC shared memory. r=glandium
This commit also allows `memfd_create` in the seccomp-bpf policy for all
process types.

`memfd_create` is an API added in Linux 3.17 (and adopted by FreeBSD
for the upcoming version 13) for creating anonymous shared memory
not connected to any filesystem.  Supporting it means that sandboxed
child processes on Linux can create shared memory directly instead of
messaging a broker, which is unavoidably slower, and it should avoid
the problems we'd been seeing with overly small `/dev/shm` in container
environments (which were causing serious problems for using Firefox for
automated testing of frontend projects).

`memfd_create` also introduces the related operation of file seals:
irrevocably preventing types of modifications to a file.  Unfortunately,
the most useful one, `F_SEAL_WRITE`, can't be relied on; see the large
comment in `SharedMemory:ReadOnlyCopy` for details.  So we still use
the applicable seals as defense in depth, but read-only copies are
implemented on Linux by using procfs (and see the comments on the
`ReadOnlyCopy` function in `shared_memory_posix.cc` for the subtleties
there).

There's also a FreeBSD implementation, using `cap_rights_limit` for
read-only copies, if the build host is new enough to have the
`memfd_create` function.

Differential Revision: https://phabricator.services.mozilla.com/D90605
2020-10-08 02:25:20 +00:00
Kartikaya Gupta
cfcbbaae93 Bug 1668921 - Update cbindgen version and generate ostream serializers for WR structs. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D92842
2020-10-08 09:24:36 +00:00
Sylvestre Ledru
9bce072e44 Bug 1588458 - Replace dxr by searchfox in the rst doc r=ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D49140
2020-10-08 08:13:15 +00:00
Mike Hommey
d3519998ac Bug 1520395 - Remove the python configure distinction between option and js_option. r=firefox-build-system-reviewers,andi,rstewart
Now that we don't recurse into the js python configure, we don't need to
have a special treatment for the options that need to be passed down to
that subconfigure, which is what js_option was for.

Differential Revision: https://phabricator.services.mozilla.com/D92727
2020-10-08 04:07:46 +00:00
Mike Hommey
a12805866c Bug 1669633 - Remove the JS_STANDALONE option. r=firefox-build-system-reviewers,rstewart
It was only meant to be used internally, when the top-level python
configure invoked the js python subconfigure. Now that this doesn't
happen, we can remove the option, and consolidate js_standalone and
building_js, which are now roughly synonyms.

Differential Revision: https://phabricator.services.mozilla.com/D92726
2020-10-07 17:48:06 +00:00
Mike Hommey
9ebbe2c5bc Bug 1669633 - Don't recurse into js/src for the python-part of configure. r=firefox-build-system-reviewers,rstewart
Instead, we now run js/src/old-configure from the top-level configure
after having run old-configure and extracted a few variables to inherit
from it.

Because we're now running from the top-level, $_objdir is always the
top-level objdir, which simplifies some things. The topobjdir in
js/src/config.status, however, needs to stay in js/src because of the
build frontend expecting it there.

When running js/src/old-configure, we used to need some special
treatment for a large number of variables for historic reasons, where
we'd take values from the assigned values before running old-configure
for some, or from AC_SUBSTs after running old-configure.

Now that both old-configure and js/src/old-configure get the same
assignments from old-configure.vars, we don't need anything special for
the former. And only a few remaining variables still need manual work
for the latter.

One notable difference, though, is that the new code doesn't try to
avoid running js subconfigure, which added complexity, and was actually
error-prone.

Differential Revision: https://phabricator.services.mozilla.com/D92725
2020-10-07 21:13:19 +00:00
Mike Hommey
796301bdaa Bug 1669633 - Turn old_configure into a template. r=firefox-build-system-reviewers,rstewart
This helps reduce the diff size for subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D92723
2020-10-07 17:56:27 +00:00
Mike Hommey
485eeaf755 Bug 1669633 - Split prepare_configure and move autoconf to old_configure. r=firefox-build-system-reviewers,rstewart
Preparing to run both old-configure and js/src/old-configure from the
same python configure run, we refactor things such that shared parts are
separate.

Differential Revision: https://phabricator.services.mozilla.com/D92722
2020-10-07 21:34:13 +00:00
Mike Hommey
cd3a2d5a79 Bug 1669633 - Remove MOZ_BUILD_ROOT. r=firefox-build-system-reviewers,andi,rstewart
It is only really used in js/src/devtools/rootAnalysis/Makefile.in,
and even there, the way it is used seems wrong, so fix that at the
same time (binaries have been linked into $DIST/bin directly for a
while).

Differential Revision: https://phabricator.services.mozilla.com/D92721
2020-10-07 17:57:38 +00:00
Mike Hommey
1b0b2b298e Bug 1669633 - Don't set AC_SUBSTs and AC_DEFINEs from old-configure directly. r=firefox-build-system-reviewers,rstewart
In order to be able to run both old-configure and js/src/old-configure
from the same python configure run, we need to stop setting the items
set by old-configure into the global sandbox config, and instead store
them to be later handled by configure.py.

Differential Revision: https://phabricator.services.mozilla.com/D92718
2020-10-07 17:59:51 +00:00
Mike Hommey
3a86574eae Bug 1669642 - Rename LLVMCONFIG to LLVM_CONFIG and derive it like we do for LLVM_OBJDUMP. r=firefox-build-system-reviewers,andi,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D92737
2020-10-07 22:36:49 +00:00
Razvan Maries
75a5750a87 Backed out 5 changesets (bug 1662564, bug 1664922, bug 1440203) for Valgrind bustages. CLOSED TREE
Backed out changeset 9366b15ee97c (bug 1440203)
Backed out changeset bb512f5fdeda (bug 1440203)
Backed out changeset be90d6aec690 (bug 1664922)
Backed out changeset f6527a1d0f14 (bug 1662564)
Backed out changeset 3a2941fa7d4b (bug 1662564)
2020-10-07 08:38:13 +03:00
Daniel Holbert
675e1e5b28 Bug 1669409: Convert the nsIPrintSettings:kEnableSelectionRB flag into a boolean, since it's the only entry in a bitfield. r=jwatt,emilio
This was the last flag that the PrintOptions bitfield was tracking.

So, this patch is effectively converting that bitfield (and its alias
"PrintOptionsBits") into a new, simpler boolean field named
"isPrintSelectionRBEnabled".

Differential Revision: https://phabricator.services.mozilla.com/D92542
2020-10-07 00:36:51 +00:00
Jed Davis
c4968e6653 Bug 1440203 - Support memfd_create in IPC shared memory. r=glandium
This commit also allows `memfd_create` in the seccomp-bpf policy for all
process types.

`memfd_create` is an API added in Linux 3.17 (and adopted by FreeBSD
for the upcoming version 13) for creating anonymous shared memory
not connected to any filesystem.  Supporting it means that sandboxed
child processes on Linux can create shared memory directly instead of
messaging a broker, which is unavoidably slower, and it should avoid
the problems we'd been seeing with overly small `/dev/shm` in container
environments (which were causing serious problems for using Firefox for
automated testing of frontend projects).

`memfd_create` also introduces the related operation of file seals:
irrevocably preventing types of modifications to a file.  Unfortunately,
the most useful one, `F_SEAL_WRITE`, can't be relied on; see the large
comment in `SharedMemory:ReadOnlyCopy` for details.  So we still use
the applicable seals as defense in depth, but read-only copies are
implemented on Linux by using procfs (and see the comments on the
`ReadOnlyCopy` function in `shared_memory_posix.cc` for the subtleties
there).

There's also a FreeBSD implementation, using `cap_rights_limit` for
read-only copies, if the build host is new enough to have the
`memfd_create` function.

Differential Revision: https://phabricator.services.mozilla.com/D90605
2020-10-06 19:20:29 +00:00
Ricky Stewart
56a1a229f2 Bug 1668718 - Don't import mach_bootstrap for virtualenvs that don't have populate_local_paths set, or in Python 3 r=mhentges,firefox-build-system-reviewers
Before, this would be written to `sitecustomize.py` irrespective of the value of `populate_local_paths`. This doesn't make sense -- since the local paths aren't included in the `virtualenv`'s `PYTHONPATH` when Python starts up, it doesn't know how to `import mach_bootstrap`. Since on `mach` startup the import hook will be loaded anyway, and the `virtualenv`s in `~/.mozbuild` (i.e. the only `virtualenv`s for which we don't `populate_local_paths`) are just used to run `mach`, this is fine and won't regress anything.

Also, since the `import` hook is only necessary for Python 2, add a couple conditional checks to get rid of the added overhead when we're running with Python 3.

This was never noticed because importing `sitecustomize` is allowed to throw an `ImportError`, which failure is ignored silently. This may be fixed in the latest version of `virtualenv`.

Differential Revision: https://phabricator.services.mozilla.com/D92290
2020-10-05 17:05:05 +00:00
David Major
0b9c307bbe Bug 1667841 - Update revert-r362047-and-r362065.patch for clang-12 r=firefox-build-system-reviewers,rstewart
The patch no longer applies cleanly because of nearby changes in 4b8cb665a1.

Instead of forking a clang-12 version of this patch, we can get away with carrying a little less context in our patch file.

Differential Revision: https://phabricator.services.mozilla.com/D91625
2020-09-28 19:03:18 +00:00
Andi-Bogdan Postelnicu
0ec28a45b6 Bug 1666993 - new bakend for static-analysis that prevents regressing issues with files that can be built outside of the unified environment. r=botond
1. Provide a new backend dedicated for C++ static-code_analysis
2. Build a list with directories, from non-unified-compat that have been fixed and
permit compiling of C++ files outside of the unified environment. With this list
we eliminate the unified sources and instead use the original source for command
attribute from compile_commands.json.
In this way if a regression appears clang-tidy will report it since it no longer uses
the unified environment for files that are compatible to be compiled standalone.
3. Remove the coverity functionality that was reading and using non-unified build files
since in practive it proved to be sub-optimal.

Differential Revision: https://phabricator.services.mozilla.com/D91011
2020-09-30 04:29:25 +00:00
Razvan Maries
3b3e92d8ee Backed out changeset a86359ce9e75 (bug 1667892) for L10n bustages. CLOSED TREE 2020-09-30 05:16:28 +03:00
Ricky Stewart
2bb808e369 Bug 1667896 - Remove MOZ_ANDROID_DISTRIBUTION_DIRECTORY r=nalexander
This config value is evidently a Fennec thing that isn't used anywhere any more.

Differential Revision: https://phabricator.services.mozilla.com/D91647
2020-09-29 01:51:13 +00:00
Ricky Stewart
d9aa989230 Bug 1667892 - Move search for wget binary from old-configure to Python configure r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D91645
2020-09-28 22:33:33 +00:00