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

952 Коммитов

Автор SHA1 Сообщение Дата
serge-sans-paille 8507c5b50c 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 e41b7821eb 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 619672a8e4 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 883a3c8e0b 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 f10c99c5a8 Backed out changeset 08e37313483d (bug 1864318) as requested. CLOSED TREE 2023-12-04 23:47:32 +02:00
serge-sans-paille 897929a1e4 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 5d9e274ba1 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 8bdb51872e 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 b2fc6ad0bb 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 f632be1a7c 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 ba92d46a42 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 3f997be608 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 75d69c6aaf 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 a1295ac7c0 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 52c87462c7 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 c04c99325f 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 0e32a17cce 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 c8c7e83a77 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 26cd3f8040 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 7ff7508830 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 1ab55a66d5 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 00ffd5e017 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 974e37adf9 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 1915d07f5c 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 f69ca7a50d 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 5dacba3398 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 a6de9f8d22 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 d8bb87469e 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 b50fd4bf85 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 e22ad0a522 Bug 1850867 - Fix android bustages. a=fix 2023-09-19 07:52:45 +03:00
Mike Hommey c8bc3a7c87 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 90c8c29f23 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
Mike Hommey 1da6d16d6d Bug 1839740 - Rename the symbol by elfhack to point to the ELF header. r=firefox-build-system-reviewers,andi
Elfhack acts as a linker, and it uses the `elf_header` symbol to point
at the ELF header in the injected code that applies relocations.
Both GNU ld and lld expose a `__ehdr_start` symbol with the same meaning,
so rename the `elf_header` symbol for compatibility. This will allow to
reuse the code in the upcoming replacement for elfhack.

Differential Revision: https://phabricator.services.mozilla.com/D187088
2023-09-16 19:52:25 +00:00
Mike Hommey 198651d478 Bug 1852646 - Always enable crash-diagnostics-dir on automation. r=firefox-build-system-reviewers,nalexander
Now that the minimum supported version of clang is 7, we don't need to
exclude clang < 7.

Differential Revision: https://phabricator.services.mozilla.com/D187946
2023-09-12 20:33:27 +00:00
Logan Rosen f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Mike Hommey b1f3975f1d Bug 1839741 - Upgrade binutils to 2.41. r=firefox-build-system-reviewers,ahochheiden
Because it bumps the alignment requirement on aarch64, we make the
elfhack test create more relocations to make the .rela.dyn section large
enough for the test to pass.

Differential Revision: https://phabricator.services.mozilla.com/D181684
2023-09-01 01:20:34 +00:00
Mike Hommey e6e7f961ea Bug 1841212 - Build elfhack injected code without eh_frame. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D182542
2023-06-30 08:11:43 +00:00
Mike Hommey e4f87a6d8c Bug 1840931 - More properly handle files > 4GB in elfhack. r=gsvelto
I'm pretty sure there are other theoretical problems in the code,
notably when a single section is larger than 4GB, but by the time
we reach that limit, bug 1839740 will have been fixed.

Differential Revision: https://phabricator.services.mozilla.com/D182447
2023-06-29 19:56:20 +00:00
Mike Hommey 01b58f59f2 Bug 1839746 - Make elfhack generate and handle a more standard SHT_RELR section. r=gsvelto
Bug 1747782 changed the format to SHT_RELR, but what's produced is still
different from a real SHT_RELR section, because it uses a terminating
nul entry.

Differential Revision: https://phabricator.services.mozilla.com/D181689
2023-06-22 23:56:47 +00:00
Cristian Tuns a6383b5dce Backed out changeset 7a6650647e00 (bug 1839741) to fix bug 1839797 CLOSED TREE 2023-06-22 02:32:20 -04:00
Mike Hommey c144be0f2e Bug 1839748 - Remove unnecessary sysctl.h includes. r=firefox-build-system-reviewers,ahochheiden
The header is gone in recent glibc versions.

Differential Revision: https://phabricator.services.mozilla.com/D181695
2023-06-22 02:45:22 +00:00
Mike Hommey f305d07229 Bug 1839741 - Upgrade binutils to 2.40. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D181684
2023-06-22 02:44:24 +00:00
Mike Hommey d7e5217ede Bug 1838328 - Add a trampoline to call original_init when it's not possible directly, aarch64 edition. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D180901
2023-06-14 08:49:14 +00:00
Mike Hommey e97e5246fd Bug 1834436 - Upgrade minimum supported GCC version to 8. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D178736
2023-06-01 20:09:19 +00:00
Ryan VanderMeulen bd25a9e6ea Bug 1835676 - Update gcc11 to version 11.4. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D179374
2023-05-29 21:07:56 +00:00
Mike Hommey 76df0cfce2 Bug 1820876 - Update NDK to r23c. r=firefox-build-system-reviewers,nalexander
Wrench android builds had been kept on rustc 1.67 waiting for this
upgrade.

Differential Revision: https://phabricator.services.mozilla.com/D172089
2023-03-23 22:18:09 +00:00
Stanca Serban 7c5ebbcf74 Backed out changeset df6f338d6a26 (bug 1820876) for causing build bustages on Android Shippable. CLOSED TREE 2023-03-23 14:13:08 +02:00
Mike Hommey 1f158eae92 Bug 1820876 - Update NDK to r23c. r=firefox-build-system-reviewers,nalexander
Wrench android builds had been kept on rustc 1.67 waiting for this
upgrade.

Differential Revision: https://phabricator.services.mozilla.com/D172089
2023-03-23 01:27:51 +00:00
Mike Hommey eaca1f3dd4 Bug 1820947 - Use "new style" sysroot on Android. r=firefox-build-system-reviewers,andi
For a few NDK releases now, the situation has been simplified wrt
headers and libraries, and while we're currently still using things here
and there because we never changed our ways, we can simplify things a
lot by using the new simplified things. This involves:
- Using a --target that contains the Android version, making clang set
  __ANDROID_API__ itself, and makes it look in $sysroot/usr/lib/$target/$ver
  when linking.
- Using the sysroot that is under toolchains/llvm/prebuilt/*.
- Removing the hacks around libstdc++/libc++.

This ends up emptying stlport compiler flags, which allows to remove a
bunch of things.

Differential Revision: https://phabricator.services.mozilla.com/D172039
2023-03-15 20:44:02 +00:00
Norisz Fay 4a35828e21 Backed out 2 changesets (bug 1820947) for causing build bustage CLOSED TREE
Backed out changeset eb6419bb8748 (bug 1820947)
Backed out changeset 9990083e8ea2 (bug 1820947)
2023-03-14 01:20:54 +02:00