Commit Graph

10087 Commits

Author SHA1 Message Date
Sylvestre Ledru
1df999712f Bug 1714788 - doc: do not provide the language if the code isn't valid r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```

Depends on D131092

Differential Revision: https://phabricator.services.mozilla.com/D131093
2021-11-16 07:59:48 +00:00
Marian-Vasile Laza
25a09c0d08 Backed out changeset 561c776bea20 (bug 1740042) for causing build bustages on llvm-readelf. 2021-11-16 02:51:16 +02:00
Mike Hommey
5459f879e5 Bug 1740042 - Use llvm-readelf instead of readelf when available. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130949
2021-11-15 22:48:34 +00:00
Marian-Vasile Laza
51e3255d7c Backed out changeset bf55cb5e6b45 (bug 1740042) for causing build bustages. CLOSED TREE 2021-11-15 22:54:31 +02:00
Mike Hommey
2c9074abb8 Bug 1740042 - Use llvm-readelf instead of readelf when available. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130949
2021-11-15 20:41:41 +00:00
Mike Hommey
3b96b9af59 Bug 1738300 - Apply clang upstream patch fixing miscompilation. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130428
2021-11-09 04:17:57 +00:00
Mike Hommey
92de67f82d Bug 1739543 - Remove unused clang toolchain configs. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130424
2021-11-08 21:25:53 +00:00
Kershaw Chang
1b01ccfacd Bug 1392272 - P1: [windows] Monitor system proxy changes, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127724
2021-11-08 09:00:26 +00:00
Chris Peterson
6ff807852e Bug 1737217 - Enable -Wunused-but-set-parameter warnings on clang. r=firefox-build-system-reviewers,glandium
But don't enable on gcc because it reports false positives, such as:

js/src/jsapi-tests/testJitABIcalls.cpp:445:61: warning: parameter 'lineno' set but not used [-Wunused-but-set-parameter]
js/src/jsapi-tests/testJitABIcalls.cpp:461:56: warning: parameter 'base' set but not used [-Wunused-but-set-parameter]

Even though those parameters are used here:

https://searchfox.org/mozilla-central/source/js/src/jsapi-tests/testJitABIcalls.cpp#445,450,461,464

Differential Revision: https://phabricator.services.mozilla.com/D129351
2021-11-06 16:58:51 +00:00
Mitchell Hentges
4d5f166b49 Bug 1730712: Use consistent Python version throughout configure r=andi
It's possible for the `PYTHON3` config to point to a different Python
than that that is executing the configure scripts themselves.

This flexibility was needed for the Python 2->3 migration, but now that
it's complete, we can remove the extra configuration and just lean on
the Python interpreter used to run configure.

Differential Revision: https://phabricator.services.mozilla.com/D129863
2021-11-04 21:41:33 +00:00
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