Commit 814542e
Bug 1941482 - Enable Clang 20 support for Firefox with Windows plugin fixes r=glandium
This change adds support for building Firefox with Clang 20, including
critical fixes for the clang-plugin dynamic linking on Windows.
Clang 20 introduced breaking changes that prevented the clang-plugin
from building on Windows:
1. Clang is built with '/Zc:dllexportInlines-' which excludes inlined
members like some methods of Attr classes from being dllexported.
2. The extract_symbols.py script became more aggressive in filtering
symbols, blocking Registry<T> static data members (Head/Tail) that
don't match function signature patterns.
The fix consists of one change to the build configuration of clang-plugin,
and one patch for the Clang 20 and trunk builds:
- plugin-registry-symbols-llvm-pr-163391.patch:
Make extract_symbols.py recognize and export Registry<T>::Head and
::Tail static members for any Registry instantiation.
See llvm/llvm-project#163367 and
llvm/llvm-project#163391.
- Add '/Zc:dllexportInlines-' to the CXX flags when building
clang-plugin, which will match the clang build configuration and
inline the members instead of referencing the symbols.
Differential Revision: https://phabricator.services.mozilla.com/D2682551 parent 1a3b3e2 commit 814542e
File tree
4 files changed
+42
-2
lines changed- build
- build-clang
- clang-plugin
4 files changed
+42
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
0 commit comments