Commit Graph

914 Commits

Author SHA1 Message Date
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
Mike Hommey
f5844f16c5 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-13 21:14:47 +00:00
Andi-Bogdan Postelnicu
d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
serge-sans-paille
60efed7f68 Bug 1466973 - Strip gcc binaries r=glandium
This reduces the archive size while keeping the compiler functional. This should not impact the quality of debug information of the compiled files
The size reduction is significant: from 236MB down to48MB.

Differential Revision: https://phabricator.services.mozilla.com/D167706
2023-01-27 21:14:34 +00:00
Mike Hommey
d43dfe4d11 Bug 1806761 - Use toolchain binutils in base-toolchain builds. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D165326
2022-12-28 21:07:04 +00:00
Heitor Neiva
b71d7b535b Bug 1801381 - Disable run_configure for mac repackaging r=glandium
Switches from `buildconfig.substs` to `bootstrap_toolchain` for the repackage job
Refactors mozpack/dmg to not depend on the environment; Moves path resolution of tools up to `mozbuild.action.{make_dmg|unpack_dmg}`
Update syntax to python 3.7+

Differential Revision: https://phabricator.services.mozilla.com/D163129
2022-12-06 21:11:43 +00:00
Norisz Fay
1235811770 Backed out changeset 632f9747a11e (bug 1801381) for causing build bustages on OSX. CLOSED TREE 2022-12-01 12:01:04 +02:00
Heitor Neiva
c502d9c55b Bug 1801381 - Disable run_configure for mac repackaging r=glandium
Switches from `buildconfig.substs` to `bootstrap_toolchain` for the repackage job
Refactors mozpack/dmg to not depend on the environment; Moves path resolution of tools up to `mozbuild.action.{make_dmg|unpack_dmg}`
Update syntax to python 3.7+

Differential Revision: https://phabricator.services.mozilla.com/D163129
2022-12-01 01:29:27 +00:00
Marco Castelluccio
ecb54845b0 Bug 1790816 - Reformat build/ with isort. r=linter-reviewers,ahal DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162668
2022-11-24 17:23:47 +00:00
Mike Hommey
3ff4ecb3f8 Bug 1798602 - Include mozconfig.linux in linux tsan mozconfig. r=decoder
The main side effect is that it enables lld on those builds.

Differential Revision: https://phabricator.services.mozilla.com/D160993
2022-11-02 08:05:03 +00:00
Jesse Schwartzentruber
0d6c077bea Bug 1779845 - Don't rewrite macos executables. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D151961
2022-07-27 15:09:27 +00:00
Mike Hommey
721c5e9fb4 Bug 1771434 - Remove build/unix/mozilla.in. r=firefox-build-system-reviewers,andi,ahochheiden
Its use was removed from Firefox in bug 552864, in Thunderbird in bug 668869
and in Seamonkey in bug 722262. That was 10 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D147484
2022-05-27 08:22:13 +00:00
Mike Hommey
b798bb1980 Bug 1770251 - Centralize PGO mozconfig bits. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D146852
2022-05-20 08:31:46 +00:00
Razvan Cojocaru
d8294d5641 Bug 1142667 - [elfhack] Leak of |relhack| in |do_relocation_section|. r=firefox-build-system-reviewers,glandium
Now using std::unique_ptr<> for relhack, relhackcode and init, so
that nothing can leak on non-success exit paths.

Differential Revision: https://phabricator.services.mozilla.com/D144138
2022-05-20 07:01:54 +00:00
Iulian Moraru
283a88b45c Backed out changeset c2a224a0f3b4 (bug 1142667) for causing multiple build bustages on host_elfhack. 2022-05-19 03:25:50 +03:00
Razvan Cojocaru
7d3f1ced24 Bug 1142667 - [elfhack] Leak of |relhack| in |do_relocation_section|. r=firefox-build-system-reviewers,glandium
Now using std::unique_ptr<> for relhack, relhackcode and init, so
that nothing can leak on non-success exit paths.

Differential Revision: https://phabricator.services.mozilla.com/D144138
2022-05-18 21:18:32 +00:00
Mike Hommey
9fa0488903 Bug 1767504 - Apply GCC upstream patch to silence a dubious warning. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D145404
2022-05-06 12:49:45 +00:00
ganguin
df23203d4e Bug 1661450 - 8/8 Allow builds without MOZ_X11 r=glandium,stransky
Allow builds without MOZ_X11 when toolkit is cairo-gtk3-wayland and X11
dependencies are missing.

Depends on D139533

Differential Revision: https://phabricator.services.mozilla.com/D139534
2022-04-20 09:32:09 +00:00
criss
8d62d22b30 Backed out 10 changesets (bug 1661450) for causing build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 2c41d82de0c5 (bug 1661450)
Backed out changeset 5f58fcd7ac0b (bug 1661450)
Backed out changeset 62e56a6dcd22 (bug 1661450)
Backed out changeset 4b422ffa729f (bug 1661450)
Backed out changeset 6ca4705772da (bug 1661450)
Backed out changeset 031a6313459f (bug 1661450)
Backed out changeset 06ddf05e97d6 (bug 1661450)
Backed out changeset 4388b1b9aafd (bug 1661450)
Backed out changeset 600f9fd09fa6 (bug 1661450)
Backed out changeset cc5e8efe3ebf (bug 1661450)
2022-04-19 12:25:14 +03:00
ganguin
a6f7d5578e Bug 1661450 - 8/8 Allow builds without MOZ_X11 r=glandium,stransky
Allow builds without MOZ_X11 when toolkit is cairo-gtk3-wayland and X11
dependencies are missing.

Depends on D139533

Differential Revision: https://phabricator.services.mozilla.com/D139534
2022-04-19 08:35:28 +00:00
Mike Hommey
3885f30dfb Bug 1758781 - Build llvm-symbolizer separately. r=firefox-build-system-reviewers,mhentges
The llvm-symbolizer tasks currently extract a llvm-symbolizer from clang
tasks. Changes in clang 14 make the hack that we have in place to keep
llvm-symbolizer statically linked to libllvm while clang uses a dynamic
libllvm not work anymore, so it's time to bite the bullet and build
llvm-symbolizer separately.

We share most of the build setup with the compiler-rt build.

Differential Revision: https://phabricator.services.mozilla.com/D140711
2022-03-11 04:10:49 +00:00
Jesse Schwartzentruber
7178259892 Bug 1708787 - Package UBSan runtime with MacOS builds. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D135635
2022-01-14 14:47:15 +00:00
Mike Hommey
7659fc415d Bug 1747782 - Use a more compact representation of relocations in elfhack. r=gsvelto
Use the SHT_RELR format which significantly improves the size reduction
from elfhack:

   total size of .rel.* + .elfhack.* sections

                       x86      x86_64   android-arm
   plain             3532904   10739544    3488888
   current-elfhack   1085815    1155994    1042048
   relr-elfhack       130219     193552     113840

Differential Revision: https://phabricator.services.mozilla.com/D134756
2021-12-31 01:32:52 +00:00
Mike Hommey
523b1551b3 Bug 1747783 - Add support for aarch64 to elfhack. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D134764
2021-12-30 20:52:55 +00:00
Mike Hommey
837162a71b Bug 1747783 - Use unsigned chars for fields that can have values > 127. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D134763
2021-12-30 20:52:55 +00:00
Mike Hommey
6eab403e68 Bug 1747778 - Test what we can test of elfhack when cross-building. r=firefox-build-system-reviewers,mhentges
While here, switch to use $(READELF).

Differential Revision: https://phabricator.services.mozilla.com/D134746
2021-12-30 00:50:56 +00:00
Mike Hommey
8918f41faa Bug 1495733 - Use a 64-bits internal representation in elfhack. r=gsvelto
Elfhack currently can't deal with files larger than 4GiB because it
translates all ELF data structures to the 32-bits variant, even for
64-bits ELF files. So if the original file has e.g. sections that start
after the 4GiB boundary, they can't be represented in memory.

Practically speaking, this is not causing problems, but has prevented a
working elfhack for aarch64 because e.g. some relocation types don't fit
in the 32-bits ELF representation.

Differential Revision: https://phabricator.services.mozilla.com/D134745
2021-12-29 01:18:29 +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
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
397ece0e6e Bug 1500802 - Remove now unused mingw32-gcc toolchain. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D125923
2021-09-17 20:55:42 +00:00
Mike Hommey
636982aa2e Bug 1500804 - Build nsis with mingw-clang rather than mingw-gcc. r=tjr
While here, build the Linux portions with a sysroot.

Differential Revision: https://phabricator.services.mozilla.com/D125922
2021-09-17 20:55:42 +00:00
Mike Hommey
da41cd5a40 Bug 1730078 - Build binutils with system gcc. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D125156
2021-09-15 02:39:51 +00:00
Mike Hommey
9ef9a07ff2 Bug 1729406 - Use .tar.zst for most toolchain artifacts. r=firefox-build-system-reviewers,andi
We leave the following ones unchanged:
- geckodriver because the results are used to releases on github.
- sixgill because the script that creates it is not in-tree.
- *-dist-toolchain because sccache is not expecting a .tar.zst.

We use native tar support in most cases, except for toolchain scripts also
used on Windows, for which we use our zstdpy script.

Differential Revision: https://phabricator.services.mozilla.com/D124733
2021-09-08 23:46:51 +00:00
Iulian Moraru
82a880399a Backed out 2 changesets (bug 1729406) for causing toolchain-wrench-deps build bustages. CLOSED TREE
Backed out changeset 2b28ac860723 (bug 1729406)
Backed out changeset 89c9940d7402 (bug 1729406)
2021-09-08 16:08:40 +03:00
Mike Hommey
cc6d99c4e2 Bug 1729406 - Use .tar.zst for most toolchain artifacts. r=firefox-build-system-reviewers,andi
We leave the following ones unchanged:
- geckodriver because the results are used to releases on github.
- sixgill because the script that creates it is not in-tree.
- *-dist-toolchain because sccache is not expecting a .tar.zst.

We use native tar support in most cases, except for toolchain scripts also
used on Windows, for which we use our zstdpy script.

Differential Revision: https://phabricator.services.mozilla.com/D124733
2021-09-08 08:00:54 +00:00
Cosmin Sabou
e097f3b06f Backed out changeset 40f514ec207e (bug 1729406) for causing windows build bustages. CLOSED TREE 2021-09-08 07:43:48 +03:00