Skip to content

[llvm] statically link TableGenTests #147577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

andrurogerz
Copy link
Contributor

Purpose

Statically link TableGenTests so it can still build when linked against an LLVM Windows DLL.

Background

The effort to build LLVM as a WIndows DLL is tracked in #109483. Additional context is provided in this discourse.

If TableGenTests is linked against LLVM built as a DLL on Windows, it will fail due to a large number of duplicate symbols found in both the LLVM DLL and TableGen libraries. This is because LLVMTableGenBasic and LLVMTableGenCommon are linked statically against LLVM (using DISABLE_LLVM_LINK_LLVM_DYLIB) so already contain a sub-set of symbols also exported from the LLVM DLL.

This patch was originally part of #145448.

@andrurogerz andrurogerz marked this pull request as ready for review July 8, 2025 20:06
@andrurogerz
Copy link
Contributor Author

@compnerd @vgvassilev here's another quick one, thanks!

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@compnerd compnerd merged commit 080ade0 into llvm:main Jul 9, 2025
12 checks passed
@andrurogerz andrurogerz deleted the llvmdll-tablegen-tests branch July 9, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants