Skip to content

Conversation

@vmustya
Copy link
Contributor

@vmustya vmustya commented Nov 1, 2025

When building LLVM and Clang on Windows with plugin support enabled,
some symbols are redundantly exported due to template instantiations and
lambda functions. These symbols are not needed in the importing
translation units and can be safely removed.

In the meantime, the global variables and static data members are needed
for correct linking and runtime behavior, so they are added to the
export list.

Also, the llvm::<Class>::dump() and clang::<Class>::dump() methods
are not needed for linking in importing translation units, because they
are only available in debug builds and should be only used for debugging
purposes. Therefore, these methods are removed from the export list.

When buildint LLVM and Clang on Windows with plugin support enabled,
some symbols are redundantly exported due to template instantiations and
lambda functions. These symbols are not needed in the importing
translation units and can be safely removed.

In the meantime, the global variables and static data members are needed
for correct linking and runtime behavior, so they are added to the
export list.

Also, the `llvm::<Class>::dump()` and `clang::<Class>::dump()` methods
are not needed for linking in importing translation units, because they
are only available in debug builds and should be only used for debugging
purposes. Therefore, these methods are removed from the export list.
@michalpaszkowski
Copy link
Member

I intend to merge the PR since the changes are needed to enable Windows builds. If anyone finds a case where this breaks things please feel free to revert and let us know what got broken and how we could debug the issue.

@michalpaszkowski michalpaszkowski merged commit 7d5c11f into llvm:main Nov 12, 2025
11 checks passed
git-crd pushed a commit to git-crd/crd-llvm-project that referenced this pull request Nov 13, 2025
llvm#165946)

When building LLVM and Clang on Windows with plugin support enabled,
some symbols are redundantly exported due to template instantiations and
lambda functions. These symbols are not needed in the importing
translation units and can be safely removed.

In the meantime, the global variables and static data members are needed
for correct linking and runtime behavior, so they are added to the
export list.

Also, the `llvm::<Class>::dump()` and `clang::<Class>::dump()` methods
are not needed for linking in importing translation units, because they
are only available in debug builds and should be only used for debugging
purposes. Therefore, these methods are removed from the export list.
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.

2 participants