Commit Graph

10077 Commits

Author SHA1 Message Date
Mitchell Hentges
67be954a8c Bug 1739177: Add requirements.pths_as_absolute() r=ahal
There were a bunch of locations where we were doing path shenanigans
with `requirements.pth/.vendored` items.

There was a bit of complexity because we were specifically making each
`pthfile` line be a relative path to support moving the Firefox
topsrcdir without causing issues.

However, now that we're more intelligent about checking if `pthfile`
lines are up-to-date (and since moving your topsrcdir will still require
re-generating the Mach virtualenv), this behaviour became less useful.

So, generalize `MachEnvRequirements` -> "sys.path lines" logic and
reuse it everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D129693
2021-11-04 14:35:08 +00:00
Niklas Goegge
5ef444d868 Bug 1732069: Consider loopback origin for Sec-Fetch-Site: same-site r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D129152
2021-11-04 08:56:29 +00:00
Alex Hochheiden
d7aba7ba43 Bug 1686137 - Vendor 'colorama' library r=mhentges, g?firefox-build-system-reviewers
Colorama enables colored text on terminal windows.

'tqdm' depends on Colorama on Windows.

Project Link: https://pypi.org/project/colorama/

Depends on D129094

Differential Revision: https://phabricator.services.mozilla.com/D130121
2021-11-03 15:41:14 +00:00
Alex Hochheiden
5eab6210dd Bug 1686137 - Vendor 'tqdm' progress bar library r=mhentges
`tqdm` allows rendering and updating a single-line progress bar, which
is useful for all sorts of different work.

Our first use case for this will be replacing `wget` with a pure-python
downloader.

Source here: https://github.com/tqdm/tqdm

Differential Revision: https://phabricator.services.mozilla.com/D129094
2021-11-03 15:41:13 +00:00
Sebastian Hengst
22d3b81141 Merge mozilla-central to autoland. CLOSED TREE 2021-11-01 23:06:15 +01:00
Mitchell Hentges
973f0aa262 Bug 1730712: Remove customizeable log handle from VirtualenvManager r=ahal
The optional `log_handle` argument was only used by:

* Configure, but the output was always dumped to stdout and *not*
  `config.log`. The manual logging _was_ used to handle encoding issues,
  but those are likely invalidated by the Python 3 migration.
* `./mach doc`, where we were putting virtualenv setup into stderr,
  which seems incorrect. The commit adding it doesn't explain why it's
  the case, but I'm guessing it shouldn't be too risky to remove.

Additionally, `log_handle` was used very inconsistently: for example,
running `install_pip_package()` would _not_ use `log_handle`.
So, removing `log_handle` removes a bit of abstraction leakage.

Differential Revision: https://phabricator.services.mozilla.com/D129298
2021-11-01 21:34:05 +00:00
Mitchell Hentges
8d7a1cbad4 Bug 1730712: Remove redundant Python version check in configure r=glandium
Mach already verifies the Python version during initialization.

Maintaining a second version check can be tough to keep up-to-date, as
we're already seeing due to the obsolete Python 2 check.

Differential Revision: https://phabricator.services.mozilla.com/D129297
2021-11-01 21:34:05 +00:00
Mitchell Hentges
162c7ab422 Bug 1732946: Vendor pip/setuptools/wheel instead of installing into venv r=ahal
Now that are prioritizing system over virtualenv site-packages, the
system `pip` is sometimes being used instead.
This is causing issues when the system pip is set up in a
distro-specific way, such as when "debundled":
https://github.com/pypa/pip/blob/9.0.1/pip/_vendor/__init__.py#L53-L61

However, if we vendor `pip`, `setuptools` and `wheel`, and ensure that
they're prioritized in the `sys.path` before anything is imported from
the system, then we can ensure that we're using a modern `pip` _and_
sidestep system-specific pip weirdness.

Note that `pip-compile`'s `--allow-unsafe` flag is not as dangerous as
it sounds.
There's confusion among maintainers about its origin:
https://github.com/jazzband/pip-tools/issues/522
Additionally, it's going to be enabled by default in a future
`pip-tools` release. So, it's not scary for us to embrace here.

Also, heads up that the "pip outdated warning" no longer needs
to be manually silenced, since pip avoids that code path when
not running from an "installed" context.

Differential Revision: https://phabricator.services.mozilla.com/D127182
2021-11-01 21:34:03 +00:00
Mitchell Hentges
a9f396324f Bug 1717051: Always populate Mach pths r=firefox-build-system-reviewers,glandium
The previous behaviour was to:
* Never add a `pthfile` to the Mach virtualenv, and
* Always add Mach's paths to the `sys.path` when Mach initializes

However, this meant that `pip` would needlessly install packages
that already exist in the vendored environment.

Tweak `pth` behaviour so that `pip` behaves more efficiently.

Differential Revision: https://phabricator.services.mozilla.com/D120402
2021-11-01 21:34:03 +00:00
Mitchell Hentges
537d201bcc Bug 1732948: Assert that the Mach venv isn't out-of-date during init r=ahal
As we leverage the Mach environment more, it becomes increasingly
important that it isn't out-of-date on developer machines.

Add an `up_to_date()` check during Mach initialization.
To minimize the cost to startup, I'm skipping the "pip list" check.

This change required moving `virtualenv` from `mozbuild` to `mach` to
make it available during the early stage of Mach init.

Differential Revision: https://phabricator.services.mozilla.com/D127144
2021-11-01 21:34:02 +00:00
Mike Hommey
afa259dd74 Bug 1738163 - Normalize mozbuild state path to a shortpath on Windows. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D129774
2021-10-28 09:33:27 +00:00
Mike Hommey
a22bb5f5ea Bug 1738114 - Apply the revert-ga478b0a199f4 patch to mac and windows clang builds. r=firefox-build-system-reviewers,andi
It's applied to the linux and android ones, and is necessary for
cross-compiles from other platforms.

Differential Revision: https://phabricator.services.mozilla.com/D129726
2021-10-28 07:03:06 +00:00
Mike Hommey
c7055c9450 Bug 1736830 - Check for libice and libsm headers during configure. r=firefox-build-system-reviewers,mhentges,andi
Adding them to the pkg_check_modules alone would add a runtime
dependency on them, which is unwanted (the code using those libraries
goes the extra mile to dynamically lookup their symbols).

So we modify pkg_check_modules to allow to only check for headers for a
given set of packages.

Differential Revision: https://phabricator.services.mozilla.com/D129096
2021-10-27 22:30:28 +00:00
Mike Hommey
19bcfe106a Bug 1736830 - Be more consistent wrt package_desc in pkg_check_modules. r=firefox-build-system-reviewers,andi
Make @depends functions and direct values have the same level of
convenience.

Differential Revision: https://phabricator.services.mozilla.com/D129589
2021-10-27 22:30:28 +00:00
Noemi Erli
b520756151 Backed out 2 changesets (bug 1736830) for causing build bustages CLOSED TREE
Backed out changeset 1845a9bc917b (bug 1736830)
Backed out changeset a4d1678f31bb (bug 1736830)
2021-10-28 00:15:27 +03:00
Mike Hommey
8603f69bcd Bug 1734747 - Work around https://github.com/rust-lang/rust/issues/90088. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D129610
2021-10-27 20:57:24 +00:00
Mike Hommey
25922f16d5 Bug 1734747 - Refactor --enable-lto handling. r=firefox-build-system-reviewers,andi
Using `if len(value) and value[0].lower() == ...` is confusing because
it doesn't make it super clear what defaults are. (also, the `lower()`
is not necessary).

We also stop setting value to thin when it was originally cross, because
it prevents special-casing for cross-lto, which we do, and it currently
doesn't actually work.

We also don't need to return a full namespace when lto is disabled (and
we already don't in an existing short-circuiting case), so we can remove
a level of indentation.

Differential Revision: https://phabricator.services.mozilla.com/D129609
2021-10-27 20:57:24 +00:00
Mike Hommey
6d304cf992 Bug 1736830 - Check for libice and libsm headers during configure. r=firefox-build-system-reviewers,mhentges,andi
Adding them to the pkg_check_modules alone would add a runtime
dependency on them, which is unwanted (the code using those libraries
goes the extra mile to dynamically lookup their symbols).

So we modify pkg_check_modules to allow to only check for headers for a
given set of packages.

Differential Revision: https://phabricator.services.mozilla.com/D129096
2021-10-27 20:54:57 +00:00
Mike Hommey
c443e7d6aa Bug 1736830 - Be more consistent wrt package_desc in pkg_check_modules. r=firefox-build-system-reviewers,andi
Make @depends functions and direct values have the same level of
convenience.

Differential Revision: https://phabricator.services.mozilla.com/D129589
2021-10-27 20:54:57 +00:00
Alex Hochheiden
a457813d8b Bug 1736704 - Added Windows 11 as a Supported Build Host under Tier-1 Hosts and Toolchains. r=gcp,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D128949
2021-10-27 14:44:08 +00:00
Andi-Bogdan Postelnicu
1582b8cfc3 Bug 1737164 - Don't produce symlinks in Windows clang toolchains. r=glandium DONTBUILD CLOSED TREE
Original patch by Andi-Bogdan Postelnicu <andi@mozilla.com>.

Differential Revision: https://phabricator.services.mozilla.com/D129222
2021-10-22 00:48:13 +00:00
Andreea Pavel
081ed1abe8 Backed out changeset 438a6427019c (bug 1737164) for landing with other author on a CLOSED TREE 2021-10-22 10:44:25 +03:00
Mike Hommey
7e4dbf20ea Bug 1737164 - Don't produce symlinks in Windows clang toolchains.
Original patch by Andi-Bogdan Postelnicu <andi@mozilla.com>.

Differential Revision: https://phabricator.services.mozilla.com/D129222
2021-10-22 00:48:13 +00:00
Julian Descottes
3921691c94 Bug 1736509 - Add https://sub*.test*.example.org:443 to build/pgo/server-locations.txt r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D128865
2021-10-21 13:58:55 +00:00
Gijs Kruitbosch
40e335f7a4 Bug 1725732 - bring MSVS project generation documentation in line with 2021 realities, r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D122655
2021-10-20 15:53:40 +00:00
Andi-Bogdan Postelnicu
0d12e234b2 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-20 12:03:20 +00:00
Butkovits Atila
c56f15eca0 Backed out changeset 7de44eaecb13 (bug 1731582) as requested by Andi. CLOSED TREE 2021-10-19 20:52:08 +03:00
Andi-Bogdan Postelnicu
151c81623a Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 14:45:59 +00:00
Marian-Vasile Laza
3883f0ad91 Backed out changeset f3cf8baf4f0a (bug 1731582) for causing build bustages. CLOSED TREE 2021-10-19 12:36:47 +03:00
Andi-Bogdan Postelnicu
da72439c02 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 08:00:30 +00:00
Mike Hommey
e3df5fd682 Bug 1736458 - Upgrade python-zstandard to 0.16.0. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D128807
2021-10-19 07:00:36 +00:00
Dennis Jackson
2858bd1345 Bug 1733374 - land NSS de3db3a55aef UPGRADE_NSS_RELEASE, r=bbeurdouche
Differential Revision: https://phabricator.services.mozilla.com/D128763
2021-10-18 16:54:04 +00:00
Jeff Muizelaar
6e8836b02a Bug 1736367 - Remove unused ReadbackLayer.h. r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D128741
2021-10-18 14:12:48 +00:00
Christoph Kerschbaumer
bc498bd4aa Bug 1736016: Add https://www.example.com:443 to build/pgo/server-locations.txt r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D128591
2021-10-15 16:54:26 +00:00
Mike Hommey
63c9e71a65 Bug 1732208 - Stop disabling unused-but-set-variable warning. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D126463
2021-10-14 00:59:11 +00:00
Mitchell Hentges
f8a3e6458a Bug 1723031: In CI, assert Mach pypi package deps using system Python r=ahal
There's an existing algorithm to check if a virtualenv's installed
packages are up-to-date with its requirements. This patch
extracts that logic so that, in cases where we can't automatically
download needed pip packages, we can at least assert that the ones
installed to the system Python are sufficient to meet our requirements.

The current only case in which this system-checking logic is applied
is when starting the Mach virtualenv and the `MOZ_AUTOMATION` or
`MACH_USE_SYSTEM_PYTHON` environment variable is set.

Differential Revision: https://phabricator.services.mozilla.com/D122890
2021-10-13 15:57:40 +00:00
Julian Descottes
081e1015d9 Bug 1734787 - Add https://example.net:443 to build/pgo/server-locations.txt r=jmaher
Having 3 regular domains to test fission scenarios will help migrating to https-first for DevTools mochitests.
example.org and example.com are both available in http and https, but example.net is only available in http for now.

This patch was created by adding https://example.net to build/pgo/server-locations.txt and then running `./mach python build/pgo/genpgocert.py`

Differential Revision: https://phabricator.services.mozilla.com/D127922
2021-10-13 14:17:14 +00:00
Mike Hommey
c1bd50d07c Bug 1734754 - Remove the use of MozbuildObject.mozconfig in mach_initialize. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D127767
2021-10-12 04:05:32 +00:00
Calixte Denizet
953076cfba Bug 1733611: Remove FlushViewOfFile call when unmaping gcda files in compiler-rt r=marco,andi
- this function (Windows only) is called when gcda are dumped on disk;
  - according to its documentation, it's only useful in case of hard failures, so in a CI context, we don't care;
  - it drastically decreases the time in the tests and consequently it avoids timeouts when we use slow disks.

Differential Revision: https://phabricator.services.mozilla.com/D127965
2021-10-08 15:06:36 +00:00
Mike Hommey
46b638b007 Bug 1731976 - Generally allow warnings in security/rlbox. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D127771
2021-10-08 09:48:38 +00:00
Andrew Halberstadt
a7a0fc9117 Bug 1733950 - Vendor 'taskcluster-taskgraph==1.0.1' into mozilla-central, r=taskgraph-reviewers,aki
This will slowly start being used by 'taskcluster/gecko_taskgraph'.

Differential Revision: https://phabricator.services.mozilla.com/D127872
2021-10-08 04:05:53 +00:00
Alexandru Michis
820696d4a1 Backed out 2 changesets (bug 1734523) for causing python failures.
CLOSED TREE

Backed out changeset dcd0fedade7e (bug 1734523)
Backed out changeset cab1ceba09dd (bug 1734523)
2021-10-08 01:19:24 +03:00
Mike Hommey
f2e2f3db8a Bug 1734523 - Remove the use of MozbuildObject.mozconfig in mach_initialize. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D127767
2021-10-07 21:22:19 +00:00
John Lin
27b2030726 Bug 1654112 - remove MediaCodecVP8Codec. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115531
2021-10-07 12:11:40 -07:00
Jeff Muizelaar
bcd31bdb9b Bug 1734511 - Remove unused TiledRegion. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D127754
2021-10-07 15:40:22 +00:00
Mike Hommey
72e3c52560 Bug 1731720 - Upgrade toolchains using clang 11 to clang 12. r=firefox-build-system-reviewers,andi
And remove the now unused clang 11 toolchains.

Differential Revision: https://phabricator.services.mozilla.com/D126176
2021-10-06 03:57:41 +00:00
Tetsuharu Ohzeki
889748a9e9 Bug 1733977 - Remove unused gfx/layers/client/ContentClient.h. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D127516
2021-10-06 00:40:06 +00:00
Narcis Beleuzu
7f08e7385e Backed out changeset 68940497078c (bug 1723031) for causing pip setup issues (bug 1733142) 2021-10-04 13:01:21 +03:00
Tetsuharu Ohzeki
fba5adcfc3 Bug 1733785 - Remove unused Layer::MayResample(). r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D127364
2021-10-03 10:22:08 +00:00
Jeff Muizelaar
8f2ab10fe4 Bug 1733601 - Remove unused ColorLayer. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D127272
2021-10-02 00:14:39 +00:00