Граф коммитов

9830 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 487119e349 Bug 1719229 - Allow the build system to use a sysroot for the host part of the build. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D119847
2021-07-14 08:54:43 +00:00
Mike Hommey 162f9b6800 Bug 1719229 - Rename the bootstrappable sysroot toolchains. r=firefox-build-system-reviewers,andi
In cross-compilation setups (x86_64 host, i686 or aarch64 target), we're
going to need two sysroots. Obviously, we need the sysroot paths to be
different in that case, so the sysroot path themselves need to contain
some distinctive name, and we'll use the `target.toolchain` name for
that (the target triplet with the vendor/machine stripped out).

Because the path name needs to be reflected in the artifact name as well
as the toolchain name, we also change them.

And because the current prefix in the toolchain name is now redundant
with the suffix, we remove the prefix, and allow the bootstrapping
mechanism to try toolchains without the prefix.

Differential Revision: https://phabricator.services.mozilla.com/D119846
2021-07-14 08:54:43 +00:00
Mike Hommey 627c20902f Bug 1576099 - Allow to forcefully enable cargo incremental. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D119714
2021-07-13 20:31:37 +00:00
Mike Hommey a6909dc7da Bug 1719852 - Disable MOZ_REQUIRE_SIGNING on esr. r=jcristau,firefox-build-system-reviewers,mhentges
It was enabled in bug 1712633 by mistake.

Because there wasn't a way to distinguish esr yet, we add one, and while
at it, expose it to the build system.

Differential Revision: https://phabricator.services.mozilla.com/D119682
2021-07-13 08:43:52 +00:00
Mike Hommey 246f307378 Bug 1719426 - Build glibc_2.27-3ubuntu1.2 ourselves. r=taskgraph-reviewers,bhearsum
As written in 00c93ac66282, relying on the 2.27-3ubuntu1.2 package being
available is a timebomb. We can however get the older sources from
launchpad, and build them ourselves.

Differential Revision: https://phabricator.services.mozilla.com/D119258
2021-07-08 22:15:37 +00:00
lyavor cc7f254576 Bug 1706126 - HTTPS- First doesn't upgrade redirection from exempt target domain to subdomain (which supports https) r=ckerschb,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D118704
2021-07-07 14:19:09 +00:00
Mike Hommey 856ee10cba Bug 1719226 - Fix clang bustage r=bustage-fix. CLOSED TREE 2021-07-07 03:15:49 +03:00
Mike Hommey 93e5ce3fe2 Bug 1719228 - Remove unused docker images and Debian packages. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D119138
2021-07-06 21:47:11 +00:00
Mike Hommey 6def90d273 Bug 1719228 - Build binutils with the toolchain sysroot. r=firefox-build-system-reviewers,andi
This allows to use the same toolchain docker images as other toolchains,
based on Debian buster.

While here, use the default max-run-time, which is more than enough for
this toolchain.

Differential Revision: https://phabricator.services.mozilla.com/D119137
2021-07-06 21:47:11 +00:00
Mike Hommey 5d89676954 Bug 1719228 - Build GCC with the toolchain sysroot. r=firefox-build-system-reviewers,andi
Because GCC is built in stages, the final stage is built with
intermediate stages's GCC, which handles the sysroot correctly, so we
end up with headers and libraries with the expected compatibility.
This allows to use the same toolchain docker images as other toolchains,
based on Debian buster.

Differential Revision: https://phabricator.services.mozilla.com/D119136
2021-07-06 21:47:10 +00:00
Mike Hommey 51effea05b Bug 1719226 - Remove old workarounds when building clang. r=firefox-build-system-reviewers,andi
- we needed -gcc-toolchain to pick C/C++ standard headers from the right
version of GCC, but we now have them in the toolchain sysroot (bug
1719207), so we can use that instead.
- we needed LD_LIBRARY_PATH when clang was built on an older version of
Debian, but that was changed in bug 1694775.

Differential Revision: https://phabricator.services.mozilla.com/D119135
2021-07-06 21:47:10 +00:00
Mike Hommey 3c173089ef Bug 1719226 - Properly print cmake error files. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D119134
2021-07-06 21:47:10 +00:00
Mike Hommey 899af76508 Bug 1719225 - Don't build binutils as part of gcc. r=firefox-build-system-reviewers,andi
We have a separate binutils toolchain already, and the only remaining
use of the binutils part of the the GCC toolchain is for the gold plugin
headers for clang, which we can add to the toolchain sysroot.

Differential Revision: https://phabricator.services.mozilla.com/D119133
2021-07-06 21:47:09 +00:00
Mike Hommey 544436ed03 Bug 1718156 - Avoid some configure tests creating the common virtualenv. r=firefox-build-system-reviewers,mhentges,andi
When running `mach python-test` on a clobbered tree, we create both the
python-test and common virtualenvs, but the former should be enough. The
latter is only created when running tests that use the BaseConfigureTest
class, when it indirectly includes init.configure, which makes the
configure sandbox run the virtualenv_python3 function, which ends up
initializing the common virtualenv. We only don't end up re-executing
that virtualenv python thanks to 6680ca0acc27 which was a workaround
that would allow any virtualenv in $objdir/_virtualenvs, while still
creating a virtualenv it won't use.

Tests now tell virtualenv_python3 to not use the normal virtualenv
manager, and remove the workaround.

Differential Revision: https://phabricator.services.mozilla.com/D118775
2021-07-05 22:33:56 +00:00
Chris Peterson 4b046732a8 Bug 1718936 - Backed out changeset f3cd92f7cd0d: Restore -Wno-range-loop-analysis. r=andi,firefox-build-system-reviewers
I removed the -Wno-range-loop-analysis warning flag in bug 1718408 because I didn't see any build failures on Try without it, but apparently I missed some.

Differential Revision: https://phabricator.services.mozilla.com/D119039
2021-07-05 06:43:44 +00:00
Chris Peterson 5897c59302 Bug 1718408 - Remove unnecessary -Wloop-analysis flag. r=firefox-build-system-reviewers,andi
We don't need to manually enable -Wloop-analysis because it just enables:

* -Wrange-loop-analysis, which we manually disable.
* -Wfor-loop-analysis, which is enabled by -Wmost, which is enabled by -Wall:

https://clang.llvm.org/docs/DiagnosticsReference.html#wall

Depends on D118900

Differential Revision: https://phabricator.services.mozilla.com/D118901
2021-07-01 18:37:42 +00:00
Chris Peterson 5294042de2 Bug 1718408 - Remove unnecessary -Woverloaded-virtual flag. r=firefox-build-system-reviewers,andi
We don't need to manually enable -Woverloaded virtual because:

* On gcc, we disable it.
* On clang, it is enabled by -Wmost, which is enabled -Wall:

https://clang.llvm.org/docs/DiagnosticsReference.html#wall

Depends on D118899

Differential Revision: https://phabricator.services.mozilla.com/D118900
2021-07-01 18:37:41 +00:00
Chris Peterson a2f4831bdc Bug 1718408 - Remove unnecessary -Wtautological-*-compare flags. r=firefox-build-system-reviewers,andi
We don't need to manually enable -Wtautological-overlap-compare because it is enabled by -Wtautological-compare, which is enabled by -Wmost, which is enabled by -Wall:

https://clang.llvm.org/docs/DiagnosticsReference.html#wall

We don't need to manually enable -Wtautological-unsigned-enum-zero-compare or -Wtautological-unsigned-zero-compare because they are enabled by -Wtype-limits, which we already enable manually:

https://clang.llvm.org/docs/DiagnosticsReference.html#wtype-limits

Depends on D118898

Differential Revision: https://phabricator.services.mozilla.com/D118899
2021-07-01 18:37:41 +00:00
Chris Peterson 79616311ea Bug 1718408 - Remove unnecessary -Wunused-function and -Wunused-variable flags. r=firefox-build-system-reviewers,andi
We don't need to manually enabled -Wunused-function or -Wunused-variable because they are enabled by -Wunused, which is enabled by -Wmost, which is enabled by -Wall.

https://clang.llvm.org/docs/DiagnosticsReference.html#wall

Depends on D118897

Differential Revision: https://phabricator.services.mozilla.com/D118898
2021-07-01 18:37:41 +00:00
Chris Peterson 6bce3b14d4 Bug 1718408 - Remove unnecessary -Wwrite-strings flag. r=firefox-build-system-reviewers,andi
We don't need to manually enable -Wwrite-strings because it is enabled by default in C++11 and we currently compile Firefox as C++17.

https://clang.llvm.org/docs/DiagnosticsReference.html#wwritable-strings

Depends on D118896

Differential Revision: https://phabricator.services.mozilla.com/D118897
2021-07-01 18:37:40 +00:00
Chris Peterson 94283e10db Bug 1718408 - Enable some clang warning flags that are currently warning-free. r=firefox-build-system-reviewers,andi
-Wdeprecated-this-capture (in a lambda expression)
warning: implicit capture of ‘this’ with a capture default of ‘=’ is deprecated
https://clang.llvm.org/docs/DiagnosticsReference.html#wdeprecated-this-capture

-Wenum-compare-conditional
Example: return foo ? enumType1 : enumType2; // deprecated in C++20
https://clang.llvm.org/docs/DiagnosticsReference.html#wenum-compare-conditional

-Wformat-type-confusion (in a sprintf-like format function)
warning: format specifies type A (e.g. short) but the argument has type B (e.g. char)
https://clang.llvm.org/docs/DiagnosticsReference.html#wformat-type-confusion

-Wshadow-uncaptured-local (variable declared in a lambda expression)
warning: declaration shadows a local variable
warning: declaration shadows a variable in C
warning: declaration shadows a static data member of C
warning: declaration shadows a field of C
warning: declaration shadows a typedef in C
warning: declaration shadows a type alias in C
warning: declaration shadows a structured binding
https://clang.llvm.org/docs/DiagnosticsReference.html#wshadow-uncaptured-local

Differential Revision: https://phabricator.services.mozilla.com/D118896
2021-07-01 18:37:40 +00:00
Mike Hommey 14497c68f9 Bug 1711856 - Don't set LD_LIBRARY_PATH for builds on automation. r=firefox-build-system-reviewers,mhentges
This shouldn't be necessary as of bug 1694785.

Differential Revision: https://phabricator.services.mozilla.com/D115467
2021-06-25 13:28:28 +00:00
Mike Hommey 6971be15e1 Bug 1695118 - Upgrade valgrind task to Debian buster. r=firefox-build-system-reviewers,mhentges
This requires a backport of valgrind to buster instead of jessie (which
we don't need a backport for anymore). Somehow the buster-based
android-build was using the backport for jessie. It now can use the
backport for buster.

We now also need a few extra packages in the valgrind docker image that
used to be installed as a side effect of installing other packages, but
aren't installed automatically anymore, while necessary.

This allows to remove the debian8-amd64-build docker image, now unused.

We add a patch to workaround an issue with rust that was fixed in older
version of valgrind but that resurfaced in a slightly different manner.
Filed upstream as https://bugs.kde.org/show_bug.cgi?id=433641.

Finally, we update the suppressions to account for system changes.

Differential Revision: https://phabricator.services.mozilla.com/D106402
2021-06-25 13:28:28 +00:00
Alexandru Michis 06bbd55be6 Backed out changeset 7a183e3b230e (bug 1711856) for being a dependency to Bug 1695118, Bug 1718131.
CLOSED TREE
2021-06-25 14:28:14 +03:00
Alexandru Michis 7498132439 Backed out 2 changesets (bug 1695118, bug 1718131) for causing leaks.
CLOSED TREE

Backed out changeset 69aa398773b4 (bug 1695118)
Backed out changeset 19805fbf94a3 (bug 1718131)
2021-06-25 13:43:04 +03:00
Mike Hommey 1d870711cb Bug 1711856 - Don't set LD_LIBRARY_PATH for builds on automation. r=firefox-build-system-reviewers,mhentges
This shouldn't be necessary as of bug 1694785.

Differential Revision: https://phabricator.services.mozilla.com/D115467
2021-06-25 09:33:05 +00:00
Mike Hommey edc5e8b9b9 Bug 1695118 - Upgrade valgrind task to Debian buster. r=firefox-build-system-reviewers,mhentges
This requires a backport of valgrind to buster instead of jessie (which
we don't need a backport for anymore). Somehow the buster-based
android-build was using the backport for jessie. It now can use the
backport for buster.

We now also need a few extra packages in the valgrind docker image that
used to be installed as a side effect of installing other packages, but
aren't installed automatically anymore, while necessary.

This allows to remove the debian8-amd64-build docker image, now unused.

We add a patch to workaround an issue with rust that was fixed in older
version of valgrind but that resurfaced in a slightly different manner.
Filed upstream as https://bugs.kde.org/show_bug.cgi?id=433641.

Finally, we update the suppressions to account for system changes.

Differential Revision: https://phabricator.services.mozilla.com/D106402
2021-06-25 09:29:33 +00:00
Mike Hommey cc44edc33f Bug 1711234 - Add a suppression for "Conditional jump or move depends on uninitialised value(s) at DoFramePointerStackWalk". r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D118777
2021-06-25 00:07:03 +00:00
Benjamin Beurdouche efe58e9863 Bug 1715772 - land NSS 0262a919f909 UPGRADE_NSS_RELEASE, r=beurdouche
Differential Revision: https://phabricator.services.mozilla.com/D118702
2021-06-24 10:56:58 +00:00
Mike Hommey 841e1d8a06 Bug 1717585 - Switch --enable-bootstrap on by default on central. r=firefox-build-system-reviewers,mhentges
As there are some things to solve first for the sysroot, we don't enable
the sysroot bootstrap unless --enable-bootstrap is given explicitly. The
default will still bootstrap everything else when building on central.

Differential Revision: https://phabricator.services.mozilla.com/D118450
2021-06-22 23:36:28 +00:00
Mike Hommey 744db845c6 Bug 1700534 - Coalesce RLBox wasmboxed libraries. r=firefox-build-system-reviewers,shravanrn,bholley,andi,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D116440
2021-06-22 05:31:33 +00:00
Kai Engert bdd0d2acfb Bug 1715584 - Require NSPR version 4.32 at configuration time. r=bbeurdouche
Differential Revision: https://phabricator.services.mozilla.com/D118369
2021-06-21 17:21:09 +00:00
Mitchell Hentges 35b16fdf28 Bug 1712133: Inline `testing/mozbase/packages.txt` contents r=ahal
The `mozbase` modules were being unconditionally added to the
`sys.path` regardless of the Mach command being run, so there isn't
much value keeping them in a separate file. Besides, all other
source module paths are described in `common_virtualenv_packages`,
why is `mozbase` special?

In the future, we're going to want to make improvements here (such as:
there's a difference between informing mach of first-party code
versus defining which third_party vendored packages should be in scope,
and that workflow difference should be represented in-code).
It's useful to peel out the existing, less useful abstraction before
we can build a stronger one.

Differential Revision: https://phabricator.services.mozilla.com/D117711
2021-06-17 14:58:17 +00:00
Mitchell Hentges 24f634d924 Bug 1712133: Remove "pth" name customization r=ahal
Having separate `<name>.pth` files in the virtual environments
isn't providing an advantage. We can simplify configuration
by putting all `pth` adjustments into a single file: `mach.pth`.

Differential Revision: https://phabricator.services.mozilla.com/D117710
2021-06-17 14:58:16 +00:00
Mitchell Hentges 31474e8925 Bug 1712133: Make virtualenv package parsing more specific r=ahal
This has two benefits:
1. `handle_package()` becomes more clear - rather than referring to
   `action` and `package` with array index numbers, we now give
   them real names. The benefit here is also shown in `up_to_date()`.
2. This makes the top-level parser for `packages()` less opinionated
   about sub-formats: if an action has a nested structure, it should
   have the flexibility to define what it looks like.

Differential Revision: https://phabricator.services.mozilla.com/D117708
2021-06-17 14:58:16 +00:00
Mitchell Hentges 722ac646db Bug 1713857: Don't set PYTHONEXECUTABLE environment variable r=glandium
After some testing in `try` and locally, the manual
`PYTHONEXECUTABLE` definitions shouldn't be needed
anymore.

There's been some work on Brew's
Python to improve its `sitecustomize` behaviour.
The most likely improvement is:
https://github.com/Homebrew/homebrew-core/pull/65297

However, I'm not fully confident in this change.
If it fails, it's more likely to affect developers
than CI. I think it's worth attempting a landing,
because if the variable is indeed obsolete, then
deleting it will avoid some spicy "action-at-a-
distance" behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D117452
2021-06-17 13:28:29 +00:00
Mike Hommey 293cc72753 Bug 1716972 - Remove leftover from bug 1695773. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D118153
2021-06-17 09:50:55 +00:00
Mitchell Hentges 6d154c1ed3 Bug 1713377: Change vendoring to use wheels where possible r=ahal,glandium
Vendoring wheels has three benefits:
* There's far less files, so Firefox checkouts will be smaller.
* It works around `zipp` not allowing `pip install`
  from extracted source `tar.gz` files. Now, we should
  be able to use the pip resolver against vendored
  packages, which will be needed for future
  mach virtualenv work.
* `./mach vendor python` takes far less time to execute.

Since we need the raw Python to be available to add to the `sys.path`,
we extract the wheels before putting them in tree.
Due to the structure of some wheels being less nested
than of a source `tar.gz`, `common_virtualenv_packages`
needed to be adjusted accordingly.

`install_pip_package()` had to be tweaked as well since you can't
`pip install` an extracted wheel. So, we "re-bundle" the wheel
before installing from a vendored package.

Replace python packages with wheels where possible

This contains the vendoring changes caused by the
last patch.

For reviewing, there's a couple things to note:
* A bunch of files are deleted, since there's generally
  less files in a wheel than in a source archive.
* There's a new `.dist-info` directory for each
  extracted wheel, so expect roughly 5 or
  6 new files for each wheel'd package.
* There should be no source code changes other than
  moves from package names changing from having
  `-` to having `_`.

Differential Revision: https://phabricator.services.mozilla.com/D116512
2021-06-16 15:53:16 +00:00
Mitchell Hentges 9f7c330b60 Bug 1712133: Remove "windows" action support from virtualenvs r=ahal
Last year, we stopped vendoring Python packages that have native
code. Since we have only had pure-python packages since, the
Windows-specific qualifier (or excluder in the case of `!windows`)
hasn't been needed.

I don't foresee us needing it again, but if anything we can peel it
back from `hg` history if this assumption is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D117468
2021-06-15 14:46:55 +00:00
Mitchell Hentges 318ecaf9b2 Bug 1712133: Synchronize virtualenv requirement parsing logic r=ahal
The `mach_bootstrap:search_path()` implementation is out of
date compared to `virtualenv.py`.

Since `python2:`, `python3:` and `optional:` packages are no
longer valid virtualenv requirement actions, they can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D117707
2021-06-15 14:46:55 +00:00
Alexis Beingessner d647cb3bfa Bug 1693832 - Use a patched version of rustc/cargo for tsan/asan builds. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D105812
2021-06-15 05:30:05 +00:00
Mitchell Hentges e389cc4cc4 Bug 1714684: Remove usages of vendored "mock" library r=perftest-reviewers,ahal,sparky
Python 3 has access to `unittest.mock` in the standard library.

Differential Revision: https://phabricator.services.mozilla.com/D117073
2021-06-14 15:34:46 +00:00
surajeet310 6ea83c8ef9 Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D117419
2021-06-10 19:33:53 +00:00
Nick Alexander bef7042147 Bug 1524662 - Add --enable-path-remapping producing compiled objects with generic paths. r=glandium
For "c" (i.e., gcc, clang, and clang-cl), this configures the
`-f{debug,macro}-path-prefix` flags.  We'd prefer to use
`-ffile-path-prefix`, but it seems that `clang-cl` does not recognize
that flag.

For "rust" (i.e., rustc/cargo), this configures `--remap-path-prefix`.

This is one step toward getting `sccache` hits across source and
object directories.

Differential Revision: https://phabricator.services.mozilla.com/D113065
2021-06-10 17:08:06 +00:00
Julien Cristau 8376ac4322 Bug 1713766 - land NSS NSS_3_67_RTM UPGRADE_NSS_RELEASE, r=bbeurdouche,aryx
Differential Revision: https://phabricator.services.mozilla.com/D117422
2021-06-10 13:25:03 +00:00
Mitchell Hentges b9531f2856 Bug 1714641: Remove usages of vendored "pathlib2" library r=ahal
Based on the docs and the code within `pathlib2`, it seems to focus
only on backporting the main features of `pathlib` to be available for
Python 2. It does _not_ provide features in newer Python versions
of `pathlib` (such as `is_mount`, new in Python 3.7). Therefore, it
doesn't provide anything that the standard library of Python 3.6+
doesn't have.

Differential Revision: https://phabricator.services.mozilla.com/D117071
2021-06-09 15:48:55 +00:00
Mitchell Hentges e568fa2e0d Bug 1714641: Remove usages of vendored "backports" code r=ahal,perftest-reviewers
It provides `shutil.which(...)`, which has been part of `shutil` since
Python 3.3.

Differential Revision: https://phabricator.services.mozilla.com/D117063
2021-06-09 15:48:52 +00:00
Mitchell Hentges fa246ce29e Bug 1714641: Replace `pythonX` items in virtualenv_packages r=ahal
Now that Mach requires Python 3, `python3:` items will always be
used and `python2:` items will never be needed.

Differential Revision: https://phabricator.services.mozilla.com/D117059
2021-06-09 15:48:50 +00:00
Deian Stefan 6468f48fe5 Bug 1653659 - Part 4: Turn on Wasm sandboxing for hunspell r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D116548
2021-06-09 15:01:03 +00:00
Andrew Osmond bde525c1b1 Bug 1715523 - Suppress likely false positive valgrind leak for RacyRegisteredThread. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D117296
2021-06-09 14:59:04 +00:00