Skip to content

Conversation

@arrv-sc
Copy link
Contributor

@arrv-sc arrv-sc commented Nov 12, 2024

Currently, LLVM provides no way to access target-specific headers out-of-tree. This makes it practically impossible to use LLVM for instructions descriptions outside llvm-project repository and forces people to clone llvm and build all of it alongside their project. Or copy LLVM .tb files and run llvm-tblgen on them by hand. This commit adds a cmake option to install those headers alongside other llvm headers which makes it possible to use llvm backend headers out of llvm-project tree.

@arrv-sc
Copy link
Contributor Author

arrv-sc commented Nov 13, 2024

Currently, LLVM provides no way to access target-specific headers
out-of-tree. This makes it practically impossible to use LLVM for
instructions descriptions outside llvm-project repository and forces
people to clone llvm and build all of it alongside their project. Or
copy LLVM .tb files and run llvm-tblgen on them by hand. This commit
adds a cmake option to install those headers alongside other llvm
headers which makes it possible to use llvm backend headers out of
llvm-project tree.

Co-authored-by: Sergei Zimmerman <[email protected]>
@llvm-beanz
Copy link
Collaborator

I'm not really a fan of complicating our build by supporting this configuration, but that isn't a strongly held opinion.

Looping in some other contributors with build expertise: @petrhosek & @compnerd.

@llvm-beanz llvm-beanz requested a review from nikic November 14, 2024 16:45
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

I'm not sure how I feel about this change. I can see the value for out-of-tree clients. However, there are no ABI guarantees and there is no library versioning. As long as these are paired with a static library it might be okay.

How do we ensure that the transitive closure is captured and nothing accidentally is left out?

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