970 Commits

Author SHA1 Message Date
Sylvestre Ledru
8ae54ea4f9 Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
2025-05-17 19:11:13 +00:00
Alex Hochheiden
9e91a1f021 Bug 1715287 - [lint] Enable remaining pyupgrade rules and lint tree r=linter-reviewers,webdriver-reviewers,translations-reviewers,whimboo,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D245320
2025-04-13 17:48:23 +00:00
Sandi Vujaković
2c0847771c Bug 1951697 - Add missing include for MOZ_RUNINIT r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D240500
2025-03-07 08:35:34 +00:00
Butkovits Atila
493d0ca5d7 Backed out changeset 45979a46e612 (bug 1951697) for causing bustages complaining about mfbt/Attributes.h. CLOSED TREE 2025-03-06 09:23:01 +02:00
Sandi Vujaković
2bfc38e347 Bug 1951697 - Add missing include for MOZ_RUNINIT r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D240500
2025-03-06 06:03:28 +00:00
Alexandre Lissy
1db5d9962d Bug 1908630 - Override LLVM Profiling for manual handling r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D218428
2024-11-05 06:30:49 +00:00
Mike Hommey
a87f0ce762 Bug 1927983 - Clean-up in-tree mozconfigs. r=firefox-build-system-reviewers,geckoview-reviewers,sergesanspaille,m_kato
-gline-tables-only is better passed to --enable-debug or
--enable-debug-symbols than via abuse of --enable-optimize.

--enable-optimize was being passed -O2 because passing
-gline-tables-only would have removed optimizations. This has the side
effect of changing the optimization level on macOS, though, so there
we keep the override.

--disable-debug is the default, remove it.
--enable-project=browser is the default, remove it.
--enable-optimize is the default, remove it.
--enable-debug-symbols is the default, remove it.
--disable-sandbox is the default on tsan builds, remove it.
--enable-optimize="-O2 -g" is, essentially, the default, remove it.
--with-android-min-sdk=21 is the default, remove it.

X11 builds only have the X11 headers, so technically speaking the
cairo-gtk3 toolkit is fine because it does the right fallback, but
using cairo-gtk3-x11-only is more explicit and would avoid surprises.

MOZ_DEBUG_SYMBOLS has been a no-op for essentially forever.

Differential Revision: https://phabricator.services.mozilla.com/D227311
2024-10-31 23:39:04 +00:00
Stanca Serban
9feb6fff15 Backed out changeset 819d4c9682d4 (bug 1908630) as requested for working in the incorrect sandbox. CLOSED TREE 2024-09-05 21:37:26 +03:00
Alexandre Lissy
128b8de6e0 Bug 1908630 - Override LLVM Profiling for manual handling r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D218428
2024-09-05 12:09:21 +00:00
Jesse Schwartzentruber
e66d96d50e Bug 1906897 - Add AFL++ builds for fuzzing debug and fuzzing coverage r=taskgraph-reviewers,bhearsum,firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D217647
2024-08-13 14:32:35 +00:00
Tamas Szentpeteri
fe2e058d68 Backed out changeset e976ff886caa (bug 1906897) for causing python failures related to ccov builds. CLOSED TREE 2024-07-26 19:43:15 +03:00
Jesse Schwartzentruber
081382237c Bug 1906897 - Add AFL++ builds for fuzzing debug and fuzzing coverage r=taskgraph-reviewers,bhearsum,firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D217647
2024-07-26 13:55:37 +00:00
Sylvestre Ledru
a3ea006705 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Mike Hommey
5184c03681 Bug 1903021 - Avoid use after vector resize. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D214330
2024-06-20 20:15:15 +00:00
Pier Angelo Vendrame
18e5b74828 Bug 1903254 - Explicitly include <array> in relrhack.cpp r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D214097
2024-06-19 09:31:33 +00:00
serge-sans-paille
3b55d7e47f Bug 1899485 - Remove obsolete build/unix/run-mozilla.sh file r=glandium
It is no longer needed, commands should now be able to run without
environment manipulation.

Differential Revision: https://phabricator.services.mozilla.com/D212089
2024-06-04 08:49:54 +00:00
serge-sans-paille
c675e326c6 Bug 1899286 - Remove legacy AIX and HP-UX support r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D211846
2024-05-29 06:57:40 +00:00
Mike Hommey
befb6adf61 Bug 1898109 - Allow the Android system linker to handle RELR relocations itself. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D211122
2024-05-22 20:22:59 +00:00
serge-sans-paille
caf9abd124 Bug 1892005 - Move MOZ_LINUX_32_SSE2_STARTUP_ERROR env check to moz.configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D207729
2024-05-03 05:57:52 +00:00
Mike Hommey
1c25310cfc Bug 1892493 - Support reading a response file when that's the only thing on the command line. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D208284
2024-04-29 20:58:36 +00:00
Mike Hommey
6aa78a25db Bug 1867459 - Replace CPU_ARCH with TARGET_CPU. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D195157
2023-12-08 10:43:59 +00:00
serge-sans-paille
51413c3b2b Bug 1864318 - Faster elfhack core loop r=glandium
This is 5% faster on my setup, mostly thanks to unrolling being
possible.

We also skip the early loop exit. Most of the bits of `bits` are generally set, so it's ok to do a
few more extra operations if we do them faster.

Differential Revision: https://phabricator.services.mozilla.com/D193366
2023-12-07 14:50:17 +00:00
Natalia Csoregi
142147334c Backed out changeset 08e37313483d (bug 1864318) as requested. CLOSED TREE 2023-12-04 23:47:32 +02:00
serge-sans-paille
723bf5da4e Bug 1864318 - Faster elfhack core loop r=glandium
This is 20% faster on my setup, and according to llvm-mca, the IPC for
the false branch (which is the hottest one) goes from 3 to 5.7, thanks
to unrolling and conditional moves.

Only activated on non-Android target though, as it breaks at runtime.

Basically, most of the bits of `bits` are generally set, so it's ok to do a
few more extra operations as we do them faster.

Differential Revision: https://phabricator.services.mozilla.com/D193366
2023-12-04 21:12:36 +00:00
Mike Hommey
5394847a26 Bug 1867181 - Set LDFLAGS to point binutils build to the sysroot libraries. r=firefox-build-system-reviewers,ahochheiden build
Differential Revision: https://phabricator.services.mozilla.com/D194946
2023-11-30 08:48:03 +00:00
Cristian Tuns
972f4da72a Backed out changeset 47c58e2355e9 (bug 1864318) for causing reftest failures in RemoteProcessMonitor CLOSED TREE 2023-11-19 06:59:14 -05:00
serge-sans-paille
5538fbd4e3 Bug 1864318 - Faster elfhack core loop r=glandium
This is 20% faster on my setup, and according to llvm-mca, the IPC for
the false branch (which is the hottest one) goes from 3 to 5.7, thanks
to unrolling and conditional moves.

Basically, most of the bits of `bits` are generally set, so it's ok to do a
few more extra operations as we do them faster.

Differential Revision: https://phabricator.services.mozilla.com/D193366
2023-11-19 10:23:20 +00:00
Natalia Csoregi
cf70430a28 Backed out changeset 10b80b0c808d (bug 1864318) for causing multiple Android 13.0 failures. CLOSED TREE 2023-11-17 19:04:14 +02:00
serge-sans-paille
c281b91095 Bug 1864318 - Faster elfhack core loop r=glandium
This is 20% faster on my setup, and according to llvm-mca, the IPC for
the false branch (which is the hottest one) goes from 3 to 5.7, thanks
to unrolling and conditional moves.

Basically, most of the bits of `bits` are generally set, so it's ok to do a
few more extra operations as we do them faster.

Differential Revision: https://phabricator.services.mozilla.com/D193366
2023-11-17 13:52:38 +00:00
Norisz Fay
8c484f4144 Backed out changeset a0950bb0cfcb (bug 1864318) for causing failures on Android 13 Pixel5 CLOSED TREE 2023-11-16 14:55:37 +02:00
serge-sans-paille
5ec9fb6bbb Bug 1864318 - Faster elfhack core loop r=glandium
This is 20% faster on my setup, and according to llvm-mca, the IPC for
the false branch (which is the hottest one) goes from 3 to 5.7, thanks
to unrolling and conditional moves.

Basically, most of the bits of `bits` are generally set, so it's ok to do a
few more extra operations as we do them faster.

Differential Revision: https://phabricator.services.mozilla.com/D193366
2023-11-16 07:19:23 +00:00
Mike Hommey
d22c04c22e Bug 1863441 - Don't filter out flags for debug info when building relrhack injected code. r=firefox-build-system-reviewers,sergesanspaille
When the injected code is used by elfhack, the debug info is thrown away
because elfhack doesn't know what to do with it, but in the case of
relrhack, the normal linker can handle it, so there's no reason not to
include the debug info anymore.

Differential Revision: https://phabricator.services.mozilla.com/D192904
2023-11-09 00:01:25 +00:00
Mike Hommey
1fc86ced8e Bug 1863485 - Properly update section headers when swapping .rel.plt and .relr.dyn of the same size. r=firefox-build-system-reviewers,sergesanspaille
When .rel.plt and .relr.dyn are the same size, after the section header
for .relr.dyn has been updated, it matches the condition for .rel.plt,
and we ended up undoing the change.

Differential Revision: https://phabricator.services.mozilla.com/D192981
2023-11-08 20:13:13 +00:00
Mike Hommey
ae48779533 Bug 1839739 - Default to lld in more cases on Linux. r=firefox-build-system-reviewers,geckoview-reviewers,releng-reviewers,andi,gbrown,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D188676
2023-10-05 20:11:07 +00:00
Mike Hommey
e857df21e7 Bug 1856752 - Allow more leniency wrt swapping .relr.dyn and .rel.plt sections. r=sergesanspaille
On ARM, lld places the .ARM.exidx section between .rel.dyn/.relr.dyn and
.rel.plt. This means we can't swap .relr.dyn and .rel.plt (well, we
could, if we also moved and rewrote the .ARM.exidx section, but that's
more work than we ought to do).
But we only need to swap the sections when we want the binary to be
compatible with older versions of glibc, which we don't care about on
desktop ARM Linux (we don't ship such builds), and don't need at all
on ARM Android. Ultimately, this is a bug in lld
(https://github.com/llvm/llvm-project/issues/68178).

Differential Revision: https://phabricator.services.mozilla.com/D190006
2023-10-05 08:40:44 +00:00
Cosmin Sabou
5648914c46 Backed out 2 changesets (bug 1854047, bug 1839739) for causing build bustages. CLOSED TREE
Backed out changeset 3fb508020251 (bug 1854047)
Backed out changeset 056fe66a8b3f (bug 1839739)
2023-10-04 03:34:26 +03:00
Mike Hommey
3f7084ed48 Bug 1839739 - Default to lld in more cases on Linux. r=firefox-build-system-reviewers,geckoview-reviewers,releng-reviewers,andi,gbrown,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D188676
2023-10-04 00:06:57 +00:00
Mike Hommey
fb4fdedb2b Bug 1855568 - Ensure that .relr.plt follows and is adjacent to .rel.dyn. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D189894
2023-10-03 23:44:51 +00:00
Mike Hommey
6a0e1c5473 Bug 1855568 - Refactor how the PT_DYNAMIC info is collected. r=sergesanspaille
We're soon going to collect a little more, and the current way of doing
so is not super convenient.

Differential Revision: https://phabricator.services.mozilla.com/D189893
2023-10-03 23:44:50 +00:00
Mike Hommey
4306dfa472 Bug 1855568 - Refactor writes in relrhack. r=sergesanspaille
In a manner similar to what's done for reads.

Differential Revision: https://phabricator.services.mozilla.com/D189892
2023-10-03 23:44:50 +00:00
serge-sans-paille
94a04210b2 Bug 1855955 - Remove useless <iostream> includes r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189648
2023-09-29 14:15:53 +00:00
Narcis Beleuzu
736e3ec02c Backed out 2 changesets (bug 1854047, bug 1839739) for causing bug 1855568. CLOSED TREE
Backed out changeset 2b3b967b6571 (bug 1854047)
Backed out changeset f957fe22f28e (bug 1839739)
2023-09-29 11:13:56 +03:00
Mike Hommey
c0d879247c Bug 1854519 - Enable rlbox sandboxing in base-toolchain tasks. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D189321
2023-09-28 20:56:31 +00:00
Mike Hommey
77dea0fe41 Bug 1839739 - Default to lld in more cases on Linux. r=firefox-build-system-reviewers,geckoview-reviewers,releng-reviewers,andi,gbrown,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D188676
2023-09-25 22:58:28 +00:00
Mike Hommey
e30f6c697a Bug 1854497 - In elfhack checks, don't look for parens. r=firefox-build-system-reviewers,ahochheiden
Old versions of llvm-readelf didn't have parens in its output for `-d`.
So instead of looking for parens, look for word boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D188897
2023-09-22 02:28:00 +00:00
Mike Hommey
29faf286bb Bug 1854303 - Apply the PT_DYNAMIC tag changes properly. r=firefox-build-system-reviewers,ahochheiden
They are supposed to be applied unconditionally, not only when there is
a GLIBC_ABI_DT_RELR version in the libc.

Differential Revision: https://phabricator.services.mozilla.com/D188894
2023-09-22 02:23:54 +00:00
Mike Hommey
6907834726 Bug 1854052 - Don't build elfhack tests when building with relrhack. r=firefox-build-system-reviewers,andi
They are not useful (and the corresponding Makefile doesn't use them
anyways, so they're built for nothing).

Differential Revision: https://phabricator.services.mozilla.com/D188679
2023-09-20 22:01:37 +00:00
Sandor Molnar
4d1bde4585 Bug 1850867 - Fix android bustages. a=fix 2023-09-19 07:52:45 +03:00
Mike Hommey
36a3881a8d Bug 1850867 - Add relrhack support for Android. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D188410
2023-09-19 04:32:17 +00:00
Mike Hommey
d4d37780f4 Bug 1839740 - New relrhack tool, a modern replacement to elfhack. r=firefox-build-system-reviewers,sergesanspaille
Elfhack is the main reason we're not using lld on Linux/Android
shippable builds, because the way it works doesn't go well with how lld
lays out ELF binaries. By leveraging the linker itself (BFD and lld both
having recently gained the ability to generate the compact relocation
info themselves), we can achieve a similar result to what elfhack is
doing, while allowing to use lld.

See more in-depth background on https://glandium.org/blog/?p=4297

Differential Revision: https://phabricator.services.mozilla.com/D187089
2023-09-16 19:52:25 +00:00