Skip to content

Commit

Permalink
Bug 1823591 - Update builders to clang 16. r=firefox-build-system-rev…
Browse files Browse the repository at this point in the history
…iewers,andi,ahochheiden

This requires a couple backports from clang trunk:
- one for llvm/llvm-project#60109
- one to replace revert-llvmorg-15-init-17171-g8bb4451a651a.patch, which
  addresses the regression rather than reverting it.

clang_include_cleaner.patch is also disabled in clang-tidy, as the patch
doesn't apply anymore, and the check it adds is not enabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D173106
  • Loading branch information
glandium committed Apr 11, 2023
1 parent bee102a commit ba27a18
Show file tree
Hide file tree
Showing 21 changed files with 1,376 additions and 2,672 deletions.
Expand Up @@ -5,22 +5,20 @@
"unpoison-thread-stacks_clang_10.patch",
"downgrade-mangling-error_clang_12.patch",
"fuzzing_ccov_build_clang_12.patch",
"revert-llvmorg-15-init-17171-g8bb4451a651a.patch",
"partial-revert-llvmorg-16-init-15775-g1ae7d83803e4.patch",
"revert-llvmorg-16-init-11301-g163bb6d64e5f.patch",
"revert-llvmorg-16-init-9324-g01859da84bad.patch",
"revert-llvmorg-16-init-7598-g54bfd0484615.patch",
"revert-llvmorg-15-init-13446-g7524fe962e47.patch",
"revert-llvmorg-15-init-11205-gcead4eceb01b.patch",
"revert-llvmorg-15-init-11205-gcead4eceb01b_clang_16.patch",
"revert-llvmorg-14-init-14141-gd6d3000a2f6d.patch",
"revert-llvmorg-14-init-11890-gf86deb18cab6.patch",
"win64-ret-null-on-commitment-limit_clang_14.patch",
"llvmorg-16-init-7386-gfc651a06699e.patch",
"llvmorg-16-init-7778-g232e0a011e8c.patch",
"llvmorg-16-init-10850-gff111a997f1b.patch",
"llvmorg-16-init-14003-g78c033b541f0.patch",
"llvmorg-16-init-14750-ga903ecb4a26d.patch",
"llvmorg-16-init-15447-g8d3ab9dfc4d4.patch",
"llvmorg-16-init-17468-gc512eda38ebe.patch",
"revert-llvmorg-14-init-11890-gf86deb18cab6_clang_16.patch",
"llvmorg-17-init-237-g1b9fbc81ff15.patch",
"llvmorg-17-init-994-g1e72920c8859.patch",
"llvmorg-17-init-2171-g8198f30f7e75.patch",
"llvmorg-17-init-4170-g5c602c46b1ef.patch",
"D146664_clang_15.patch",
"win64-ret-null-on-commitment-limit_clang_14.patch",
"compiler-rt-rss-limit-heap-profile.patch"
]
}
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-linux64.json
Expand Up @@ -5,7 +5,6 @@
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
"patches": [
"clang_include_cleaner.patch",
"clang-tidy-ci.patch"
]
}
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-macosx64.json
Expand Up @@ -2,7 +2,6 @@
"stages": "1",
"build_clang_tidy": true,
"patches": [
"clang_include_cleaner.patch",
"clang-tidy-ci.patch"
]
}
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-win64.json
Expand Up @@ -3,7 +3,6 @@
"build_clang_tidy": true,
"patches": [
"revert-llvmorg-14-init-14141-gd6d3000a2f6d.patch",
"clang_include_cleaner.patch",
"clang-tidy-ci.patch"
]
}
2 changes: 1 addition & 1 deletion build/build-clang/clang-trunk.json
Expand Up @@ -7,7 +7,7 @@
"fuzzing_ccov_build_clang_12.patch",
"revert-llvmorg-17-init-4120-g02e8eb1a438b.patch",
"partial-revert-llvmorg-16-init-15775-g1ae7d83803e4.patch",
"revert-llvmorg-16-init-11301-g163bb6d64e5f.patch",
"revert-llvmorg-16-init-11301-g163bb6d64e5f_clang_17.patch",
"revert-llvmorg-16-init-9324-g01859da84bad_clang_17.patch",
"revert-llvmorg-16-init-7598-g54bfd0484615.patch",
"revert-llvmorg-15-init-13446-g7524fe962e47.patch",
Expand Down
45 changes: 45 additions & 0 deletions build/build-clang/llvmorg-17-init-237-g1b9fbc81ff15.patch
@@ -0,0 +1,45 @@
From 1b9fbc81ff15f6ad5a0e7f29c486c6edd0bce94c Mon Sep 17 00:00:00 2001
From: Mike Hommey <mh@glandium.org>
Date: Thu, 26 Jan 2023 21:28:09 +0100
Subject: [PATCH] [extract_symbols.py] Filter out more symbols for MSVC

This strips out about 5k symbols.

Fixes https://github.com/llvm/llvm-project/issues/60109

Reviewed By: john.brawn

Differential Revision: https://reviews.llvm.org/D142431
---
llvm/utils/extract_symbols.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py
index 0f8e8ba64c80..298ee6ba4eeb 100755
--- a/llvm/utils/extract_symbols.py
+++ b/llvm/utils/extract_symbols.py
@@ -141,7 +141,10 @@ def should_keep_microsoft_symbol(symbol, calling_convention_decoration):
# Remove calling convention decoration from names
match = re.match('[_@]([^@]+)', symbol)
if match:
- return match.group(1)
+ symbol = match.group(1)
+ # Discard floating point/SIMD constants.
+ if symbol.startswith(("__xmm@", "__ymm@", "__real@")):
+ return None
return symbol
# Function template instantiations start with ?$; keep the instantiations of
# clang::Type::getAs, as some of them are explipict specializations that are
@@ -165,6 +168,9 @@ def should_keep_microsoft_symbol(symbol, calling_convention_decoration):
# namespace doesn't exist outside of that translation unit.
elif re.search('\?A(0x\w+)?@', symbol):
return None
+ # Skip X86GenMnemonicTables functions, they are not exposed from llvm/include/.
+ elif re.match('\?is[A-Z0-9]*@X86@llvm', symbol):
+ return None
# Keep mangled llvm:: and clang:: function symbols. How we detect these is a
# bit of a mess and imprecise, but that avoids having to completely demangle
# the symbol name. The outermost namespace is at the end of the identifier
--
2.39.0.1.g6739ec1790

2 changes: 1 addition & 1 deletion build/build-clang/llvmorg-17-init-4170-g5c602c46b1ef.patch
Expand Up @@ -67,7 +67,7 @@ index e9be04aceb3d..fb61265543d1 100644
--- a/llvm/cmake/modules/LLVMInstallSymlink.cmake
+++ b/llvm/cmake/modules/LLVMInstallSymlink.cmake
@@ -4,7 +4,10 @@

set(CMAKE_INSTALL_LIBDIR "lib")
include(GNUInstallDirs)

-function(install_symlink name target outdir)
Expand Down

0 comments on commit ba27a18

Please sign in to comment.