Skip to content
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

Compiler API: implement linking with installed-LLVM #14086

Open
bjacob opened this issue Jun 13, 2023 · 5 comments
Open

Compiler API: implement linking with installed-LLVM #14086

bjacob opened this issue Jun 13, 2023 · 5 comments
Labels
compiler/api IREE's public C compiler API and iree-compile-module tools

Comments

@bjacob
Copy link
Contributor

bjacob commented Jun 13, 2023

When built with installed-LLVM (a.k.a. bring-your-own-LLVM, as opposed to the default bundled-LLVM build), the Compiler API currently disables linking, as a runtime error:
https://github.com/openxla/iree/blob/c457c30c0ed86f42b76f18eb7fa160d6daeba49a/compiler/src/iree/compiler/API/Internal/LLDToolEntryPoint.cpp#L12-L21

This IREE_COMPILER_LLD_DISABLED token is defined in the build when IREE_LLD_TARGET is falseish,
https://github.com/openxla/iree/blob/c457c30c0ed86f42b76f18eb7fa160d6daeba49a/compiler/src/iree/compiler/API/Internal/CMakeLists.txt#L95-L111

Which happens when building with installed-LLVM, since IREE_LLD_TARGET is only defined in the bundled-LLVM case.

@bjacob bjacob added the compiler/api IREE's public C compiler API and iree-compile-module tools label Jun 13, 2023
@ScottTodd
Copy link
Member

Oh, I had some state on this with #12583 and related issues/discussions (#12830, #12884). I've context switched out much of that though...

@Evan-Zhao
Copy link

Evan-Zhao commented Nov 9, 2023

Curious what's the status on this now? I'm on commit #675aafb56 (18 hours ago) and ran into the same problem.

@stellaraccident
Copy link
Collaborator

I wasn't aware that we had left this dangling issue. I think some patches were landed which probably fixed the mechanism but probably neglected to get it over the line completely.

@ScottTodd
Copy link
Member

#15580 made LLD optional, but I still see a few "byo llvm" tests trying to link with it and failing (on #15878, logs: https://github.com/openxla/iree/actions/runs/7171206985/job/19525680395?pr=15878#step:4:18074).

@Evan-Zhao
Copy link

#15580 made LLD optional, but I still see a few "byo llvm" tests trying to link with it and failing (on #15878, logs: https://github.com/openxla/iree/actions/runs/7171206985/job/19525680395?pr=15878#step:4:18074).

I see that merge request (good to have!), but IREE_COMPILER_LLD_DISABLED is still around as a separate TODO item on this line. Do we have that done somewhere waiting to be merged? If not, maybe I can go and try to figure this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/api IREE's public C compiler API and iree-compile-module tools
Projects
None yet
Development

No branches or pull requests

4 participants