-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
LLVM ABI Annotations #67502
Draft
tstellar
wants to merge
34
commits into
llvm:main
Choose a base branch
from
tstellar:llvm-abi-mixed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
LLVM ABI Annotations #67502
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tstellar
force-pushed
the
llvm-abi-mixed
branch
from
October 1, 2023 04:19
a2500c7
to
95b3b57
Compare
I'm working on rebasing this. |
tstellar
force-pushed
the
llvm-abi-mixed
branch
from
November 7, 2023 00:10
95b3b57
to
f9702f3
Compare
This my latest rebase. The commit history is still pretty messy, but now I've separated the scripted changes from the manual changes. I'm going to work on upstreaming some of the general fixes that are needed to enable the annotations, then I'll rebase this again. |
This header was included after the implementations to work around an issue with FreeBSD, however, this causes some issues when adding dllimport attributes to the headers on Windows.
This is used only by opt.
tstellar
force-pushed
the
llvm-abi-mixed
branch
from
November 9, 2023 08:01
f9702f3
to
707e610
Compare
nikic
pushed a commit
that referenced
this pull request
Aug 14, 2024
…eded for explicit symbol visibility (#103900) In multiple source files function definitions never sees there declaration in a header because its never included causing linker errors when explicit symbol visibility macros\dllexport are added to the declarations. Most of these were originally found by @tstellar in #67502 TargetRegistry.h is needed in MCExternalSymbolizer.cpp for createMCSymbolizer Analysis/Passes.h is needed in LazyValueInfo.cpp and RegionInfo.cpp for createLazyValueInfoPassin and createRegionInfoPass Transforms/Scalar.h is needed in SpeculativeExecution.cpp for createSpeculativeExecutionPass
bwendling
pushed a commit
to bwendling/llvm-project
that referenced
this pull request
Aug 15, 2024
…eded for explicit symbol visibility (llvm#103900) In multiple source files function definitions never sees there declaration in a header because its never included causing linker errors when explicit symbol visibility macros\dllexport are added to the declarations. Most of these were originally found by @tstellar in llvm#67502 TargetRegistry.h is needed in MCExternalSymbolizer.cpp for createMCSymbolizer Analysis/Passes.h is needed in LazyValueInfo.cpp and RegionInfo.cpp for createLazyValueInfoPassin and createRegionInfoPass Transforms/Scalar.h is needed in SpeculativeExecution.cpp for createSpeculativeExecutionPass
compnerd
pushed a commit
that referenced
this pull request
Sep 6, 2024
…ty annotations These are my initial build and code changes to supporting building llvm as shared library/DLL on windows(without force exporting all symbols) and making symbol visibility hidden by default on Linux which adding explicit symbol visibility macros to the whole llvm codebase. Updated cmake code to allow building llvm-shlib on windows by appending /WHOLEARCHIVE:lib to the linker options. Remove the hardcoded CMake error from using LLVM_BUILD_LLVM_DYLIB on windows. Updated CMake to define new macros to control conditional export macros in llvm/Support/Compiler.h Use /Zc:dllexportInlines- when compiling with clang-cl on windows with a opt out CMake option to disable using it. Replace some use of LLVM_EXTERNAL_VISIBILITY with new export macros. Some of the cmake and code changes are based on @tstellar's earlier PR #67502. I have Windows building using clang-cl, while for MSVC its at-least able to build libllvm, but some tests can't build because llvm iterator template metaprogramming that doesn't work well with dllexport. Linux should build without issue. My full branch is here https://github.com/fsfod/llvm-project/tree/llvm-export-api-20.0 and including all the auto generated export macros from clang tooling based system.
VitaNuo
pushed a commit
to VitaNuo/llvm-project
that referenced
this pull request
Sep 12, 2024
…ty annotations These are my initial build and code changes to supporting building llvm as shared library/DLL on windows(without force exporting all symbols) and making symbol visibility hidden by default on Linux which adding explicit symbol visibility macros to the whole llvm codebase. Updated cmake code to allow building llvm-shlib on windows by appending /WHOLEARCHIVE:lib to the linker options. Remove the hardcoded CMake error from using LLVM_BUILD_LLVM_DYLIB on windows. Updated CMake to define new macros to control conditional export macros in llvm/Support/Compiler.h Use /Zc:dllexportInlines- when compiling with clang-cl on windows with a opt out CMake option to disable using it. Replace some use of LLVM_EXTERNAL_VISIBILITY with new export macros. Some of the cmake and code changes are based on @tstellar's earlier PR llvm#67502. I have Windows building using clang-cl, while for MSVC its at-least able to build libllvm, but some tests can't build because llvm iterator template metaprogramming that doesn't work well with dllexport. Linux should build without issue. My full branch is here https://github.com/fsfod/llvm-project/tree/llvm-export-api-20.0 and including all the auto generated export macros from clang tooling based system.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my first attempt at adding LLVM ABI Annotations to the LLVM header files. Due to some issues with Windows, there are two sets of annotations. LLVM_CLASS_ABI which is used to annotate classes and is enabled only on Linux, and LLVM_FUNC_ABI which is used to annotate functions and is enabled on both Linux and Windows.