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

10146 Коммитов

Автор SHA1 Сообщение Дата
Jan-Erik Rediger 1496adf625 Bug 1744674 - Update to Glean v42.3.0 & glean_parser v4.3.1 r=chutten
Also updates the docs on how to update the glean_parser in-tree.
Also adds a `no_lint` exception to test pings to avoid breaking the
build.

Differential Revision: https://phabricator.services.mozilla.com/D133077
2021-12-13 11:24:50 +00:00
Mike Hommey 059f34b0db Bug 1745115 - Apply the same patches as clang 13 to clang trunk. r=firefox-build-system-reviewers,andi
We're currently omitting a lot of them. This requires reverting a few
more patches that were followups for llvmorg-13-init-8182-gc2297544c047.

Differential Revision: https://phabricator.services.mozilla.com/D133318
2021-12-10 00:29:59 +00:00
Mike Hommey e0e86945f5 Bug 1745115 - Refactor clang configs. r=firefox-build-system-reviewers,andi
We separate the patchset from the per-platform configuration, which
will ensure we keep the same patchset across them (spoiler alert: we
weren't).
Also, as most builds are PGO, use that in per-platform configurations,
and add an override config that sets it back to 2-stages for the
builds we don't want to PGO.

Differential Revision: https://phabricator.services.mozilla.com/D133317
2021-12-10 00:29:58 +00:00
Mike Hommey 8c429c53cc Bug 1745115 - Allow to give multiple configs to build-clang.py. r=firefox-build-system-reviewers,andi
And merge them. This will allow to deduplicate and uniformize them.

Differential Revision: https://phabricator.services.mozilla.com/D133316
2021-12-10 00:29:58 +00:00
Mike Hommey 7c80050538 Bug 1745115 - Adjust patches paths earlier. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D133315
2021-12-10 00:29:57 +00:00
Mike Hommey 8c2cea7d74 Bug 1745115 - Default number of stages to build clang to 2. r=firefox-build-system-reviewers,andi
- stage 1 is building clang with whatever compiler is available
- stage 2 is building clang with the clang built during stage 1
- stage 3 is building clang with the clang built during stage 2. It's
only useful when it's actively compared against stage 2, or when
there's a stage 4.
- stage 4 is building clang with the clang built during stage 3, with the
profile generated during stage 3, when stage 2 produced a clang with
instrumentation enabled.

We're not actively comparing the output of stage 2 and 3 when not doing
PGO, so it's not useful to do 3-stage builds.

Differential Revision: https://phabricator.services.mozilla.com/D133314
2021-12-10 00:29:57 +00:00
Mike Hommey 02fd41ba68 Bug 1745115 - Rename revert-ga478b0a199f4.patch. r=firefox-build-system-reviewers,andi
Rename it to revert-$(git describe a478b0a199f4).patch, and reorder
reversal patches so that newest patches are reverted first. It does
not matter right now because there are no inter-dependencies between
patches, but eventually, it will happen, and consistency will be
helpful.

Differential Revision: https://phabricator.services.mozilla.com/D133313
2021-12-10 00:29:57 +00:00
Mike Hommey 3d6b1fb351 Bug 1745115 - Keep only one revert patch for 2a078c307204. r=firefox-build-system-reviewers,andi
We had three versions:
- one that is unused but has a header explaining why the patch is there,
  and has the regular `revert-$(git describe 2a078c307204).patch` name.
- one that is applied to trunk that was adapted to clang-trunk when
  trunk was 13 and that retained the name with a `-trunk` suffix.
- one that is applied to clang 13, is identical to the one for trunk,
  and has 13 instead of 12 in its name.

We only need one of them.

Differential Revision: https://phabricator.services.mozilla.com/D133312
2021-12-10 00:29:56 +00:00
Mike Hommey c60168e1b6 Bug 1745129 - Use `--gcc-toolchain=...` rather than `-gcc-toolchain ...`. r=firefox-build-system-reviewers,andi
Apparently the latter doesn't work anymore with clang 14.

Differential Revision: https://phabricator.services.mozilla.com/D133330
2021-12-09 08:28:11 +00:00
Mike Hommey 8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Marian-Vasile Laza 38a48759ce Backed out changeset 984c21a8cf6a (bug 1744890) for causing build bustages. CLOSED TREE 2021-12-08 11:23:12 +02:00
Mike Hommey 7373e2d918 Bug 1744890 - Remove unused clang toolchains. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D133180
2021-12-08 06:29:15 +00:00
Mike Hommey f4c2da275f Bug 1744890 - Remove compiler-rt-cross-compile.patch. r=firefox-build-system-reviewers,andi
It's not needed anymore now that we cross-build the mac compiler-rt
separately.

Differential Revision: https://phabricator.services.mozilla.com/D133178
2021-12-08 06:29:15 +00:00
Mike Hommey 6110e21789 Bug 1744890 - Remove build_type field from clang configs. r=firefox-build-system-reviewers,andi
`Release` is the default already.

Differential Revision: https://phabricator.services.mozilla.com/D133177
2021-12-08 06:29:14 +00:00
Mike Hommey 5acfe5550f Bug 1744890 - Remove assertions field from clang configs. r=firefox-build-system-reviewers,andi
`false` is the default already.

Differential Revision: https://phabricator.services.mozilla.com/D133176
2021-12-08 06:29:14 +00:00
Mike Hommey 7cdb0e3c39 Bug 1744890 - Remove build_libcxx from individual configs. r=firefox-build-system-reviewers,andi
And make build-clang use a sensible default corresponding to what
the configs were doing.

Differential Revision: https://phabricator.services.mozilla.com/D133175
2021-12-08 06:29:14 +00:00
Mike Hommey 6ab9b68288 Bug 1744640 - Apply real upstream fix for remainder of bug 1736970. r=andi
In bug 1736970, we reverted an upstream change that was causing
non-determinism. In the meantime, I was able to reduce the problem to a
small C++ file, and from there, upstream was able to come up with a
straightforward actual fix.

Differential Revision: https://phabricator.services.mozilla.com/D133013
2021-12-08 06:29:13 +00:00
Mike Hommey 3a0d37231d Bug 1744182 - Disable clang support for curl. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D133011
2021-12-08 06:29:12 +00:00
Sandor Molnar c0474edcdf Backed out 3 changesets (bug 1744604) for causing build bustages in TestNonParameterChecker. CLOSED TREE
Backed out changeset 31d7633b2826 (bug 1744604)
Backed out changeset 3fc47ff6a295 (bug 1744604)
Backed out changeset 051767551298 (bug 1744604)
2021-12-08 03:51:39 +02:00
Nika Layzell 6781985fe4 Bug 1744604 - Part 3: Relax the alignas lint to be more accurate to the potential alignment issue, r=andi
The platform in question which triggered this lint being added is the windows
x86 ABI, which pre-msvc version 19.14 emitted an error when passing complex
aggregate types as parameters due to not being able to align them.
Unfortunately modern versions of Clang still have a bug in the implementation
of the post-19.14 ABI and will pass types with incorrect alignments.

This change makes the intended behaviour more clear and avoids linting against
alignments <= the pointer alignment on all platforms, as well as alignment for
types which will be re-aligned in the callee by clang.

Finally, it also adds an exception for the `std::function` stdlib type which is
16-byte aligned on macOS, but has a legal alignment on windows x86, and
therefore should not be linted against as it will behave correctly on all
platforms.

In the future, if we update to a version of clang without this ABI bug, we may
want to remove this lint entirely.

Depends on D132996

Differential Revision: https://phabricator.services.mozilla.com/D132997
2021-12-07 20:38:16 +00:00
Nika Layzell 0047d8c90a Bug 1744604 - Part 2: Be less restrictive with the non-memmovable static analysis, r=andi
This change adds an exception for stl types which implement
`std::is_trivially_move_constructible` and `std::is_trivially_destructible`, as
these are generally stable parts of the standard library type definition which
may be relied on by downstream code.

Depends on D132995

Differential Revision: https://phabricator.services.mozilla.com/D132996
2021-12-07 20:38:15 +00:00
Nika Layzell 19478cb9ed Bug 1744604 - Part 1: Make CustomTypeAnnotation more flexible, r=andi
This allows CustomTypeAnnotation to customize the type traversal behaviour to
allow things like opting library types out of static analysis easier. It will
be used in parts 2 and 3 to improve the non-memmoveable and non-param trait
analysis.

Differential Revision: https://phabricator.services.mozilla.com/D132995
2021-12-07 20:38:15 +00:00
Mike Hommey ff6f9d7f54 Bug 1738133 - Undo workaround for https://github.com/rust-lang/rust/issues/88576. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D133015
2021-12-07 06:37:26 +00:00
Mitchell Hentges 0fb9e1cb04 Bug 1743592: Don't resolve/create scoped state_dir in CI r=ahal
We only need a workdir-scoped state_dir when an on-disk virtualenv will
be created for the Mach site.

This change defers the resolution of the state_dir until we know that a
VENV will be created.

Also modify "telemetry.py" so that it isn't creating a
scoped state-dir to compare "sys.executable" against.

Differential Revision: https://phabricator.services.mozilla.com/D132706
2021-12-03 16:26:45 +00:00
Mike Hommey 332d586576 Bug 1744212 - Add ellipsis to valgrind suppressions. r=emilio
The upgrade of rustc added some frames between calls, either from better
debug info, or from changes in optimizations.

Differential Revision: https://phabricator.services.mozilla.com/D132776
2021-12-03 12:49:04 +00:00
kriswright df91a347b4 Bug 1532955 - Track available memory on linux. r=gsvelto,tkikuchi
This introduces a low memory watcher that dispatches an offthread read of /proc/meminfo every 5000/1000ms depending on memory levels, then determines which information to act on. It works like this:
- Get a percentage of `MemAvailable` versus `MemTotal`.
- If memory drops below 5% availability, we are in a memory pressure scenario
- If `MemAvailable` is not large enough to accommodate a content process, we are in a memory pressure scenario
- If we are in a memory pressure scenario, notify the observers from the main thread.

The value I decided to use to represent a content process was based on observation and should be adjusted if it is not representative of what we consider a "typical" content process.

Differential Revision: https://phabricator.services.mozilla.com/D117972
2021-12-02 11:14:30 +00:00
Noemi Erli c25daf6c77 Backed out changeset 4b8b155c97a5 (bug 1532955) for causing build bustage in TestAvailableMemoryWatcherLinux.cpp CLOSED TREE 2021-12-02 12:24:03 +02:00
kriswright 58551a6795 Bug 1532955 - Track available memory on linux. r=gsvelto,tkikuchi
This introduces a low memory watcher that dispatches an offthread read of /proc/meminfo every 5000/1000ms depending on memory levels, then determines which information to act on. It works like this:
- Get a percentage of `MemAvailable` versus `MemTotal`.
- If memory drops below 5% availability, we are in a memory pressure scenario
- If `MemAvailable` is not large enough to accommodate a content process, we are in a memory pressure scenario
- If we are in a memory pressure scenario, notify the observers from the main thread.

The value I decided to use to represent a content process was based on observation and should be adjusted if it is not representative of what we consider a "typical" content process.

Differential Revision: https://phabricator.services.mozilla.com/D117972
2021-12-02 07:16:50 +00:00
Nick Alexander f79e555648 Bug 1742885 - Use valid Windows SDK dir in `--enable-path-remapping`, and normalize SDK dirs. r=firefox-build-system-reviewers,glandium
Without normalization, the Windows SDK dirs are usually like
`c:/Program Files (x86)/Windows Kits/{8.1,10}`, which fails because
the build system (really, `cc-rs`) doesn't handle spaces in paths.

Differential Revision: https://phabricator.services.mozilla.com/D132287
2021-12-02 04:03:42 +00:00
Sandor Molnar e3932a5144 Backed out changeset 572b175efb09 (bug 1696504) for causing regressions. a=backout 2021-12-01 19:48:29 +02:00
Chris Peterson 0d93eda754 Bug 1738401 - Remove -Wshadow-uncaptured-local warning flag. r=firefox-build-system-reviewers,andi
I enabled -Wshadow-uncaptured-local warnings in bug 1718408 because the flag didn't report any -Wshadow-uncaptured-local warnings. Unfortunately, clang didn't report any warnings due to clang bug https://bugs.llvm.org/show_bug.cgi?id=52325: clang -Wshadow-uncaptured-local (and some other -Wshadow*) flags doesn't actually enable these warnings; they're only enabled by the meta flags -Wshadow and -Wshadow-all.

I see now that there are over 500 -Wshadow-uncaptured-local warnings, too many to realistically fix them all, so we should remove -Wshadow-uncaptured-local.

The -Wshadow-field-in-constructor-modified flag is also affected by the clang bug, but I'd like to keep setting the -Wshadow-field-in-constructor-modified flag in case the clang bug is ever fixed. There are no -Wshadow-field-in-constructor-modified warnings in mozilla-central; I fixed the last one in bug 1738400.

Differential Revision: https://phabricator.services.mozilla.com/D132290
2021-12-01 06:40:05 +00:00
Mike Hommey a90ac64587 Bug 1743708 - Fix clang-plugin tests to pass with clang-trunk. r=andi
This upstream change[1] changed the error messages when arrays are
involved, so we adjust the expected-errors/expected-notes to account for
that.

1. aee4925507

Differential Revision: https://phabricator.services.mozilla.com/D132533
2021-12-01 06:28:02 +00:00
Mike Hommey a3f67c9a7c Bug 1743536 - Don't set GCC_USE_GNU_LD when using lld on mac. r=firefox-build-system-reviewers,mhentges
In that case, lld's interface is ld64's not GNU's.

Differential Revision: https://phabricator.services.mozilla.com/D132454
2021-11-30 21:55:49 +00:00
Agi Sferro 79940ac0dd Bug 1740358 - Download Java from adoptium. r=mhentges,glandium
We already use the adoptopenjdk on some platforms, this allows us to have a
more predictable Java binary on all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D130878
2021-11-30 16:10:59 +00:00
Mitchell Hentges 6571032077 Bug 1739067: Scope Mach virtualenv to be checkout-specific r=perftest-reviewers,ahal,sparky
Build and run the Mach virtualenv from a `state_dir` that is
"specific-to-topsrcdir".

As part of this, move `get_state_dir()` to `mach` so that it's usable
before `sys.path` entries are fully set up.

Differential Revision: https://phabricator.services.mozilla.com/D130383
2021-11-29 22:33:54 +00:00
Rob Lemley 3b62e0f6b3 Bug 1731158 - Allow initializing mach from a Thunderbird source repo. r=firefox-build-system-reviewers,mhentges
mach will initialize from comm/build/mach_initialize.py if it's present.
See bug 1731160. The initialization function wraps the one in build/mach_initialize.py,
then extends sys.path and loads more mach_commands.py files

Differential Revision: https://phabricator.services.mozilla.com/D131869
2021-11-29 18:34:58 +00:00
Christian Holler 6110156f18 Bug 1738278 - Add fuzzing snapshot API. r=truber,firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D129823
2021-11-25 11:20:43 +00:00
Mike Hommey 21c8cb7ed7 Bug 1696504 - Bump macOS builds to SDK 11.0. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D131588
2021-11-24 22:47:43 +00:00
Mitchell Hentges abeedf3bbd Bug 1717051: Automatically create and activate Mach virtualenv r=ahal
Consolidate Mach virtualenv management to the front of the
Mach process. This obsoletes `./mach create-mach-environment`
and simplifies the `sh` portion of the top-level `./mach` script.

This helps ensure that the Mach virtualenv doesn't become
out-of-sync and simplifies the mental model of the Mach
virtualenv situation.

Differential Revision: https://phabricator.services.mozilla.com/D120401
2021-11-24 20:06:33 +00:00
Mitchell Hentges 144daeecaf Bug 1731836: Simplify `./mach python` arguments r=ahal
`--no-virtualenv` was needed for one use case: the
`get_and_diffoscope` task, despite not needing `psutil`, would
run into failures during virtualenv-creation because we used to
unconditionally build the `psutil` package, and `get_and_diffoscope`
didn't have the environment needed for such a build.

Since we no longer build and install `psutil` into every virtualenv,
it's no longer needed for its one usage, which means that it can be
removed.

`--requirements` is replaced by `--virtualenv`, which removes an
ad-hoc pip package installation and embraces the centralized dep
system.

`--no-activate` is now implied by default: a virtualenv is only
created and activated if `--virtualenv` is provided.`

`ipython==7.16.1` was the chosen version because it is the last
one compatible with Python 3.6.

Differential Revision: https://phabricator.services.mozilla.com/D131529
2021-11-24 20:06:33 +00:00
Mitchell Hentges cea54423c4 Bug 1738848: Handle virtualenv case where metadata file is missing r=ahal
At Mach initialization time, it needs to know if it's not running from
the Mach virtualenv so it can decide to insulate itself from the
external sys.path.

However, the current mechanism of detecting the Mach virtualenv
struggles if the venv is old, and therefore missing its metadata file.
In such a case, it's recognized as "not the Mach venv" rather than "an
out-of-date Mach venv".

As part of this, I'm realizing that simply using the metadata file as a
"virtualenv has finished building" marker is insufficient, because it
will cause similar confusion here. This is solved with a "finalization"
key in in the metadata.

Differential Revision: https://phabricator.services.mozilla.com/D130794
2021-11-24 20:06:31 +00:00
Shravan Narayan a5aa14d7ac Bug 1742851 - Temporarily increase timeout for automation valgrind run r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D132067
2021-11-24 19:19:31 +00:00
Mitchell Hentges b61d7dd71f Bug 1732946: Update vendored libraries for `black` compatibility r=ahal
This is needed because `black==21.11b1` requires `click>=7.1.2`
`pathspec<1,>=0.9.0`, and `typing-extensions>=3.10.0.0`.

Differential Revision: https://phabricator.services.mozilla.com/D127163
2021-11-24 15:23:49 +00:00
Mike Hommey ef3f58e380 Bug 1736970 - Apply 2 clang upstream fixes for reproducibility and revert one. r=andi
The revert doesn't have a lot of impact, as it's only for debug info
about enums with a 128-bits integer representation.

Differential Revision: https://phabricator.services.mozilla.com/D132001
2021-11-24 07:07:48 +00:00
Butkovits Atila 8625ba46e5 Backed out changeset 6a2e62e9cc99 (bug 1732946) for causing failures at test_vendor.py. CLOSED TREE 2021-11-24 05:03:12 +02:00
Mike Hommey 1263f84c42 Bug 1741454 - Revert clang's D100879. r=andi
It assumes 16-bytes alignment for small allocations on 64-bits, which is
not true for mozjemalloc allocations.
This only addresses the problem with mozilla.org-produced builds. We may
have to figure out something for downstreams.

Differential Revision: https://phabricator.services.mozilla.com/D131883
2021-11-24 02:38:06 +00:00
Mitchell Hentges 9e5e6e2e0f Bug 1732946: Update vendored libraries for `black` compatibility r=ahal
This is needed because `black==21.11b1` requires `click>=7.1.2`
`pathspec<1,>=0.9.0`, and `typing-extensions>=3.10.0.0`.

Differential Revision: https://phabricator.services.mozilla.com/D127163
2021-11-23 23:46:33 +00:00
Marian-Vasile Laza 376fd53683 Backed out changeset a899281204c7 (bug 1696504) for causing GTest failures. 2021-11-23 11:51:05 +02:00
Mike Hommey 9caeaefc7d Bug 1696504 - Bump macOS builds to SDK 11.0. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D131588
2021-11-23 02:29:31 +00:00
Mike Hommey a154421f99 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-23 02:28:18 +00:00