[all-commits] [llvm/llvm-project] be215a: [Windows] Don't export clang::interp symbols for p...
Ryan VanderMeulen via All-commits
all-commits at lists.llvm.org
Thu Sep 10 00:12:03 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be215a25f00139d68517589d78a79c3aa7a7eb26
https://github.com/llvm/llvm-project/commit/be215a25f00139d68517589d78a79c3aa7a7eb26
Author: Ryan VanderMeulen <ryanvm at gmail.com>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M llvm/utils/extract_symbols.py
Log Message:
-----------
[Windows] Don't export clang::interp symbols for plugins (#221295)
With `LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON`, `clang.exe` built from the
23.x release branch exports 66679 symbols on x86_64 Windows, over the
65535 limit of the PE export table, so it no longer links:
```
lld-link: error: too many exported symbols (got 66679, max 65535)
```
For comparison, the same configuration on 22.1.8 exports 65465 symbols,
so the headroom was already almost gone.
`clang::interp`, the constant expression bytecode interpreter, accounts
for roughly 4500 of the exported symbols (counted with `llvm-readobj
--coff-exports` on a linked aarch64 23.1.0 `clang.exe`). Its headers
live in `clang/lib/AST/ByteCode` and are not installed; the only mention
in a public header is the forward declaration of `interp::Context` in
`ASTContext.h`. A plugin cannot call into it, so there is no reason to
keep exporting it. Filtering it out follows the existing
`dump`/`dumpColor`/`printPretty` exclusions in
`should_keep_microsoft_symbol`.
Related: #87865 (open; earlier rounds #60109, #56109). This does not get
the MSVC-with-examples configuration from that issue under the limit by
itself, but it removes the largest block of symbols that can never be
used by a plugin, and is what gets the Firefox clang 23 toolchain
(x86_64-pc-windows-msvc, X86;ARM;AArch64;WebAssembly,
clang+lld+clang-tools-extra) from 66679 to roughly 62100 exports.
---
**AI tool use disclosure** (per the [LLVM AI Tool Use
Policy](https://llvm.org/docs/AIToolPolicy.html)): this change was
developed with Claude Code assisting in the analysis and drafting. The
root cause was established against real 23.1.0 binaries and libraries,
the patch was reviewed and tested by the author in Firefox's CI, and the
author is accountable for and able to answer questions about it. Commits
carry an `Assisted-by:` trailer.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list