Commit Graph

641 Commits

Author SHA1 Message Date
Mike Hommey
56367314c0 Bug 1786338 - Apply upstream patch fixing slop issues on aarch64 mac. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D169858
2023-02-16 01:06:34 +00:00
Mike Hommey
667769a3b7 Bug 1815364 - Remove bug47258-extract-symbols-mbcs.patch. r=firefox-build-system-reviewers,ahochheiden
The patch was added back in bug 1661129 to work around
https://bugs.llvm.org/show_bug.cgi?id=47258 and the patch now doesn't
apply anymore after changes on clang trunk. OTOH, it also seems that the
problem described in the llvm bug report doesn't happen anymore, so just
get rid of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D169292
2023-02-14 00:17:13 +00:00
Mike Hommey
3f793f3d90 Bug 1812974 - Remove cctools dependency for clang toolchains. r=firefox-build-system-reviewers,ahochheiden
The non-raw clang toolchains do still need cctools for lipo when
aggregating the compiler-rts.

Differential Revision: https://phabricator.services.mozilla.com/D168034
2023-02-01 15:09:39 +00:00
Mike Hommey
e24baca557 Bug 1812974 - Remove some unnecessary flags. r=firefox-build-system-reviewers,ahochheiden
These flags used to be necessary when we first were cross-compiling
clang, but more recent (although now old) changes have made them
actually unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D168033
2023-02-01 15:09:39 +00:00
Stanca Serban
4bb42b9d45 Backed out 7 changesets (bug 1812974) for clang bustages. CLOSED TREE
Backed out changeset 839cf7e96788 (bug 1812974)
Backed out changeset b65050508523 (bug 1812974)
Backed out changeset 10c5442e487c (bug 1812974)
Backed out changeset 2185787a02c0 (bug 1812974)
Backed out changeset 2191a1c60417 (bug 1812974)
Backed out changeset 4074d5e1544d (bug 1812974)
Backed out changeset 1c6b291568f1 (bug 1812974)
2023-02-01 14:08:25 +02:00
Mike Hommey
00373f5e4b Bug 1812974 - Remove some unnecessary flags. r=firefox-build-system-reviewers,ahochheiden
These flags used to be necessary when we first were cross-compiling
clang, but more recent (although now old) changes have made them
actually unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D168033
2023-02-01 10:59:35 +00:00
Mike Hommey
2fe409322f Bug 1813356 - Partially revert clang upstream change to index profile data files. r=firefox-build-system-reviewers,ahochheiden
In bug 1811960, the change was fully reverted, but that now conflicts with
more recent changes to clang trunk. So instead, we only revert the part that
affects the writing of the profile data files.

Differential Revision: https://phabricator.services.mozilla.com/D168404
2023-01-31 17:17:17 +00:00
Mike Hommey
2c62c82447 Bug 1811960 - Revert clang upstream change to index profile data files. r=firefox-build-system-reviewers,ahochheiden,andi
Differential Revision: https://phabricator.services.mozilla.com/D167620
2023-01-27 09:07:02 +00:00
Mike Hommey
05d471ef16 Bug 1812214 - Cross compile the stage1 windows clang. r=firefox-build-system-reviewers,andi
as well as clang-tidy.

Differential Revision: https://phabricator.services.mozilla.com/D167757
2023-01-27 07:22:44 +00:00
Mike Hommey
4ad3f5cabc Bug 1812214 - Refactor build-clang.py to prepare for Windows cross-compilation. r=firefox-build-system-reviewers,andi
The "osx_cross_compile" + "OSX_ARCH" approach is not exactly nice to
generalize.

Differential Revision: https://phabricator.services.mozilla.com/D167756
2023-01-27 07:22:43 +00:00
Mike Hommey
729cee32cc Bug 1812214 - Use llvm-ar/llvm-ranlib for macos builds of clang. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D167755
2023-01-27 07:22:43 +00:00
Mike Hommey
6e7f93b2ff Bug 1812214 - Share configuration between clang and clang-tidy. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D167754
2023-01-27 07:22:43 +00:00
Mike Hommey
b76230ed4d Bug 1812214 - Stop passing libtool to cmake when building clang. r=firefox-build-system-reviewers,sergesanspaille
It's not used anyway:
```
CMake Warning:
  Manually-specified variables were not used by the project:
    CMAKE_LIBTOOL
```

Differential Revision: https://phabricator.services.mozilla.com/D167753
2023-01-27 07:22:42 +00:00
Mike Hommey
722b543e49 Bug 1810249 - Revert clang change that broke debug info on mac. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D167898
2023-01-26 07:54:34 +00:00
serge-sans-paille
229778db45 Bug 1801268 - enable lto-built clang r=firefox-build-system-reviewers,glandium
Using ThinLTO because it's a good compromise between performance and
compilation speed.

Activating it for both profile generation and profile usage, doing it
only for profile usage leads to a lot of mismatch, aka

        function control flow change detected (hash mismatch)

which leads to profile information not beoing used.

This requires using the whole llvm toolchain (lld, llvm-ar, llvm-ranlib)
from the same revision.

This is disabled on Windows where it causes link error on the LLVM
Plugin system.

Differential Revision: https://phabricator.services.mozilla.com/D162371
2023-01-25 09:46:40 +00:00
serge-sans-paille
db82d92639 Bug 1789713 - Backport LLVM's https://reviews.llvm.org/D141691 r=glandium
This landed upstream, so no need to backport it to clang-trunk.json

Differential Revision: https://phabricator.services.mozilla.com/D167260
2023-01-24 13:28:51 +00:00
Butkovits Atila
bc26410af7 Backed out changeset 5f2a653cbb3d (bug 1789713) for causing build bustages. CLOSED TREE 2023-01-20 12:32:34 +02:00
serge-sans-paille
810cf8ca2d Bug 1789713 - Backport LLVM's https://reviews.llvm.org/D141691 r=glandium
This landed upstream, so no need to backport it to clang-trunk.json

Differential Revision: https://phabricator.services.mozilla.com/D167260
2023-01-20 08:39:28 +00:00
Mike Hommey
b3546dca04 Bug 1809769 - Refresh patches against last changes in clang trunk. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D166622
2023-01-12 03:00:06 +00:00
Joel Maher
6fac03cc4d Bug 1806091 - patch clang to work with latest win11. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D165555
2022-12-29 18:08:58 +00:00
Mike Hommey
0bf5962c29 Bug 1807780 - Cherry-pick clang trunk change that adds support for root-relative overlays. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D165595
2022-12-29 00:05:48 +00:00
serge-sans-paille
256310912f Bug 1807012 - Fix detection of lld-link under windows r=glandium
Backport of https://reviews.llvm.org/D140534

Differential Revision: https://phabricator.services.mozilla.com/D165406
2022-12-27 22:37:47 +00:00
Marco Castelluccio
f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Mike Hommey
c65f0eaeae Bug 1806940 - Fix subtle syntax error introduced in bug 1781188. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D165371
2022-12-22 05:34:20 +00:00
Mike Hommey
d015645fd0 Bug 1806221 - Adjust clang patches to upstream changes on trunk. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D164973
2022-12-18 21:24:05 +00:00
Mike Hommey
a8631ad250 Bug 1805813 - Update clang patch to upstream changes on trunk. DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D164777
2022-12-15 05:32:03 +00:00
serge-sans-paille
c04dd9a256 Bug 1799423 - link clang with lld r=firefox-build-system-reviewers,glandium
As a side effect, this obsoletes the "link" config as clang always uses
the lld linker alongside its own install.

Differential Revision: https://phabricator.services.mozilla.com/D161436
2022-12-14 07:56:22 +00:00
Norisz Fay
08f7e9ef03 Backed out changeset 79025940a6a6 (bug 1799423) for causing Bug 1804813 a=backout 2022-12-09 06:48:09 +02:00
serge-sans-paille
e8902c687b Bug 1799423 - link clang with lld r=firefox-build-system-reviewers,glandium
As a side effect, this obsoletes the "link" config as clang always uses
the lld linker alongside its own install.

Differential Revision: https://phabricator.services.mozilla.com/D161436
2022-12-08 05:09:48 +00:00
serge-sans-paille
7868df2196 Bug 1804251 - Update debian-11 docker image r=glandium
- Update base snapshot
- Upgrade to clang-13 and add lld-13 as a preliminary step for https://bugzilla.mozilla.org/show_bug.cgi?id=1799423

Differential Revision: https://phabricator.services.mozilla.com/D163945
2022-12-07 05:09:30 +00:00
Mike Hommey
32914abf9f Bug 1803938 - Followup: revert-llvmorg-16-init-9324-g01859da84bad was only used by clang-trunk.json DONTBUILD
It didn't need a "dupe" with a _clang_16 suffix.

Differential Revision: https://phabricator.services.mozilla.com/D163902
2022-12-06 05:45:15 +00:00
Mike Hommey
f1153cc30a Bug 1803938 - Adjust patches to clang trunk changes.
Differential Revision: https://phabricator.services.mozilla.com/D163799
2022-12-05 22:55:14 +00:00
Butkovits Atila
9894c19165 Backed out changeset c353f81b2823 (bug 1799423) for causing build OSX bustages. CLOSED TREE 2022-12-01 15:42:11 +02:00
serge-sans-paille
aae108f1a3 Bug 1799423 - link clang with lld r=firefox-build-system-reviewers,glandium
As a side effect, this obsoletes the "link" config as clang always uses
the lld linker alongside its own install.

Differential Revision: https://phabricator.services.mozilla.com/D161436
2022-12-01 08:51:47 +00:00
Mike Hommey
26798a9ff2 Bug 1801029 - Stop reverting the clang-trunk patches that broke bindgen. r=firefox-build-system-reviewers,ahochheiden
Now that we have an updated version of bindgen that handles those
changes, we can stop applying the patches.

Differential Revision: https://phabricator.services.mozilla.com/D163376
2022-11-30 22:06:50 +00:00
Mike Hommey
45d8d6e8f9 Bug 1802820 - Remove profdata-compat.patch. r=firefox-build-system-reviewers,andi
It was only really needed when we were still using rustc 1.64 (llvm 14),
but now that we have a rustc based on the same llvm version as clang, we
don't need it anymore (and it doesn't apply cleanly on trunk anymore).

Differential Revision: https://phabricator.services.mozilla.com/D163267
2022-11-29 08:38:22 +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
Andi-Bogdan Postelnicu
4cf7602483 Bug 1799640 - unused include files checker in clang-tidy. r=glandium,sergesanspaille
Ported from clangd, this still can be improved over time, but it can be landed.
This was based on the work from https://bit.ly/3TkV2N1

  * The utility makes the assumption that all header are self contained!
  * It only checkes `Decls` from the main translation file, where SourceLocarion is the
    passed `cpp` file.
  * It builds a list with all of the includes from the translation unit.
  * It matches all of the `Decls` from the main translation units with definitions from the
    included header files and builds a list with used header files.
  * All of the includes that are not part of the matched used header files are considered
    to be unused. Of course this is correct if the first assumption if followed by the coding guide,
    where all of the header are self contained. Since the mozilla code base doesn't follow this approach
    false positives might appear where the is the following situation:
FOO.cpp
  #include <A>
  #Include <B>

If header `A` defines a symbol that is used by header `B` and `B` doesn't include `A` nor
it has symbols defined that are used by `FOO.cpp` then `B` it will be marked as potentially to be removed
by the tool.
This is the limitation determined by header that are not self contained.

The limitation presented above can be fixed in the future with extra work, but it's very time expensive
during the runtime of the checker.

Differential Revision: https://phabricator.services.mozilla.com/D161583
2022-11-24 16:15:51 +00:00
Cristian Tuns
aad27a0603 Backed out changeset 01470df94a33 (bug 1799640) as requested by Andi CLOSED TREE 2022-11-24 10:43:24 -05:00
Andi-Bogdan Postelnicu
3c68509ca3 Bug 1799640 - unused include files checker in clang-tidy. r=glandium,sergesanspaille
Ported from clangd, this still can be improved over time, but it can be landed.
This was based on the work from https://bit.ly/3TkV2N1

  * The utility makes the assumption that all header are self contained!
  * It only checkes `Decls` from the main translation file, where SourceLocarion is the
    passed `cpp` file.
  * It builds a list with all of the includes from the translation unit.
  * It matches all of the `Decls` from the main translation units with definitions from the
    included header files and builds a list with used header files.
  * All of the includes that are not part of the matched used header files are considered
    to be unused. Of course this is correct if the first assumption if followed by the coding guide,
    where all of the header are self contained. Since the mozilla code base doesn't follow this approach
    false positives might appear where the is the following situation:
FOO.cpp
  #include <A>
  #Include <B>

If header `A` defines a symbol that is used by header `B` and `B` doesn't include `A` nor
it has symbols defined that are used by `FOO.cpp` then `B` it will be marked as potentially to be removed
by the tool.
This is the limitation determined by header that are not self contained.

The limitation presented above can be fixed in the future with extra work, but it's very time expensive
during the runtime of the checker.

Differential Revision: https://phabricator.services.mozilla.com/D161583
2022-11-23 14:21:03 +00:00
Csoregi Natalia
0a4632e16b Backed out changeset e9bd011dbf75 (bug 1799423) for causing toolchains failures. CLOSED TREE 2022-11-22 14:22:00 +02:00
serge-sans-paille
936dd7061f Bug 1799423 - link clang with lld r=firefox-build-system-reviewers,glandium
As a side effect, this obsoletes the "link" config as clang always uses
the lld linker alongside its own install.

Differential Revision: https://phabricator.services.mozilla.com/D161436
2022-11-22 09:23:51 +00:00
Csoregi Natalia
69b86f1ded Backed out changeset 440b5894d289 (bug 1799423) as per request. CLOSED TREE 2022-11-22 08:24:23 +02:00
serge-sans-paille
f8aeb3cbd7 Bug 1799423 - link clang with lld r=firefox-build-system-reviewers,glandium
As a side effect, this obsoletes the "link" config as clang always uses
the lld linker alongside its own install.

Differential Revision: https://phabricator.services.mozilla.com/D161436
2022-11-22 05:54:51 +00:00
Mike Hommey
c7e769789a Bug 1801041 - Build trunk-based llvm-symbolizer on the toolchains branch. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D162266
2022-11-22 00:13:29 +00:00
Mike Hommey
a446023ead Bug 1800621 - Increase slop to prevent thunk out of range. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D162259
2022-11-17 19:58:25 +00:00
Mike Hommey
79fc010202 Bug 1801058 - Update builders to clang 15.0.5. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D162273
2022-11-17 19:57:30 +00:00
Christian Holler
0ee39a42f7 Bug 1798865 - Adjust llvm-symbolizer lookup order. r=glandium,andi
Differential Revision: https://phabricator.services.mozilla.com/D161138
2022-11-08 08:16:22 +00:00
Cosmin Sabou
4d88a72636 Backed out 2 changesets (bug 1798865) for causing spidermonkey exceptions.
Backed out changeset e14f128a212e (bug 1798865)
Backed out changeset 70a4325293f5 (bug 1798865)
2022-11-08 07:15:14 +02:00
Mike Hommey
c7eb03d629 Bug 1799062 - Update builders to clang 15.0.4. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D161240
2022-11-07 22:22:15 +00:00