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

10158 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 69ea299bd8 Bug 1746106 - Normalize unwrapped rustup paths. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D133945
2021-12-16 07:38:48 +00:00
Mike Hommey 382aa3d467 Bug 1415595 - Remove support for different hardening flags in js/. r=firefox-build-system-reviewers,andi
They don't differ anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133859
2021-12-15 23:56:33 +00:00
Mike Hommey f2d03f559c Bug 1415595 - Enable FORTIFY_SOURCE on Android. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D133858
2021-12-15 23:56:33 +00:00
Marian-Vasile Laza 18ee06e0b2 Backed out 2 changesets (bug 1744886) for causing build bustages. CLOSED TREE
Backed out changeset 6453423359d0 (bug 1744886)
Backed out changeset 7383efc30b77 (bug 1744886)
2021-12-16 02:13:41 +02:00
Mike Hommey 4b86be51fc Bug 1744886 - Override the vcpkg and cmake crates. r=firefox-build-system-reviewers,andi
with mostly empty crates.

Differential Revision: https://phabricator.services.mozilla.com/D133848
2021-12-15 21:40:22 +00:00
Jan-Erik Rediger 681640b137 Bug 1745908 - Update Glean in mach to prevent RNG bug. r=Dexter
Differential Revision: https://phabricator.services.mozilla.com/D133869
2021-12-15 10:56:19 +00:00
Mike Hommey 03fd673445 Bug 1746088 - Move --with-system-libevent to python configure. r=firefox-build-system-reviewers,andi
libevent has had a pkg-config file for more than 10 years, so use that.

Differential Revision: https://phabricator.services.mozilla.com/D133797
2021-12-15 07:10:10 +00:00
Mike Hommey e21f091a6d Bug 1746085 - Move --with-system-png to python configure. r=firefox-build-system-reviewers,andi
Like with e.g. --with-system-zlib in bug 1641760, all supported versions
of libpng now have a pkg-config file, so use that instead of the manual
checks.

Differential Revision: https://phabricator.services.mozilla.com/D133796
2021-12-15 07:10:09 +00:00
Nika Layzell fb07e18588 Bug 1744604 - Part 4: Make the alignas lint behave more consistently across platforms, r=andi
On aarch64 and x86-64 windows, the behaviour of canPassInRegisters is slightly
different than other platforms, accepting types to be passed in registers which
wouldn't be passed in registers on other platforms. This causes the lint to
behave slightly differently on that platform. This patch changes the lint to
always follow the non-win64 behaviour required by the C++ standard.

Depends on D132997

Differential Revision: https://phabricator.services.mozilla.com/D133685
2021-12-14 16:49:18 +00:00
Nika Layzell 5c13f41dd5 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.

Differential Revision: https://phabricator.services.mozilla.com/D132997
2021-12-14 16:49:18 +00:00
Nika Layzell 2e21209147 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.

Differential Revision: https://phabricator.services.mozilla.com/D132996
2021-12-14 16:49:17 +00:00
Nika Layzell ab7c298175 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-14 16:49:17 +00:00
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