-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add support for Bazel 6 & 7 #2009
Conversation
@sjain-stanford do you want try this? |
@fzakaria thanks for working on this. I gave it a shot but since we're on slightly older LLVM, couldn't verify the lit tests work (hit build errors). If you've tested it on your end, I say we either land and circle back if I hit issues, or keep this open and I reach out when we do our next integrate (in ~2 weeks). WDYT? |
Let's revisit when you integrate to confirm since the purpose of the change is to support your integrate. |
Okay I'm back to this as our integrate expectedly fails:
Will re-try after cherry-picking this change. |
@fzakaria do you mind rebasing this branch on latest HEAD? I'm seeing some merge conflicts that I'm not too familiar resolving:
|
Previous PR openxla#2006 added support for Bazel 7 but some of the changes in Bazel 7 are not backwards compatible with 6. This is a problem for some of our consumers that embed our project in other Bazel workspaces. Specifically, the name of the runfiles directory was changed from the workspace name to be '_main'. The solution adopted here is to use @python_rules and programmatically determine the runfiles directory relative to the lit.cfg.py file.
732af01
to
1933fda
Compare
@sjain-stanford updated. |
@fzakaria confirming the patch works for downstream stablehlo integrations 🎉
Since the llvm lit config setup is pretty much munging paths anyways, I don't have a strong preference one way or another (doing it in lit.cfg.py vs BUILD). Please go with your best judgment here. Once this lands, I will go ahead and bump to stablehlo@HEAD in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for helping restore the builds in our downstream repos.
[LLVM](https://github.com/llvm/llvm-project/tree/e5ed7b6e2fd368b722b6359556cd0125881e7638) (Feb 27) [StableHlo](https://github.com/openxla/stablehlo/tree/d214e2e2bd568a80a9f25515907b64dd7b98c538) (March 5)** [Torch-MLIR](https://github.com/llvm/torch-mlir/tree/a86e89ecb5c7929a39a38743fb7cacadf1ff41bb) (Mar 4) DONE: - [x] **This is the stablehlo commit right before Bazel 7 (bzlmod) changes landed (openxla/stablehlo#2006) which breaks downstream integrations. Stablehlo devs have kindly provided a fix at openxla/stablehlo#2009 - if it works, I'll revise the stablehlo commit to HEAD.
Previous PR #2006 added support for Bazel 7 but some of the changes in Bazel 7 are not backwards compatible with 6.
This is a problem for some of our consumers that embed our project in other Bazel workspaces.
Specifically, the name of the runfiles directory was changed from the workspace name to be '_main'.
The solution adopted here is to use @python_rules and programmatically determine the runfiles directory relative to the lit.cfg.py file.