-
Notifications
You must be signed in to change notification settings - Fork 608
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
Make bazel_to_cmake configurable. #12765
Conversation
This reworks bazel_to_cmake so that it searches for a .bazel_to_cmake.cfg.py file and uses its location as the root of the repository. This file is also evaluated and provides repository-specific configuration for the tool. There may still be some work to fully generalize but this should get us pretty close to being able to use bazel_to_cmake in related OpenXLA projects. Progress on #12520 for letting us use bazel_to_cmake in out of tree plugin repositories.
self._converter.body += ( | ||
f"list(REMOVE_ITEM {glob_var} {self._expand_cmake_var(exclude_var)})\n" | ||
) | ||
return [self._expand_cmake_var(var) for var in glob_vars] | ||
|
||
# TODO(gcmn) implement these types of functions in a less hard-coded way | ||
def platform_trampoline_deps(self, basename, path="base"): |
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.
Maybe move this to the IREE config?
f"{td_file_block}" | ||
f"{outs_block}" | ||
f"{tblgen_block}" | ||
f")\n\n") | ||
|
||
def iree_gentbl_cc_library(self, **kwargs): |
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.
There are still a lot of iree_*
functions in here. Should we move these to the IREE config? Or is the idea that they're general enough that other repos could use them? We should probably rename them and move promote them to some separate place in that case, but this is OK for now.
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.
I was trying to split the difference between things that were "private to IREE" and things that would be used as part of openxla projects that depend on IREE. Things I judged in the latter category stayed central.
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.
Ok this is fine for now. Just thinking that as the boundary becomes clearer we should probably rename/migrate/generalize. We might also want to enable some way of including multiple configs, like one loading another or something.
PTAL |
This reworks bazel_to_cmake so that it searches for a .bazel_to_cmake.cfg.py file and uses its location as the root of the repository. This file is also evaluated and provides repository-specific configuration for the tool. There may still be some work to fully generalize but this should get us pretty close to being able to use bazel_to_cmake in related OpenXLA projects. Progress on #12520 for letting us use bazel_to_cmake in out of tree plugin repositories.
This reworks bazel_to_cmake so that it searches for a .bazel_to_cmake.cfg.py file and uses its location as the root of the repository. This file is also evaluated and provides repository-specific configuration for the tool. There may still be some work to fully generalize but this should get us pretty close to being able to use bazel_to_cmake in related OpenXLA projects. Progress on iree-org#12520 for letting us use bazel_to_cmake in out of tree plugin repositories.
This reworks bazel_to_cmake so that it searches for a .bazel_to_cmake.cfg.py file and uses its location as the root of the repository.
This file is also evaluated and provides repository-specific configuration for the tool.
There may still be some work to fully generalize but this should get us pretty close to being able to use bazel_to_cmake in related OpenXLA projects.
Progress on #12520 for letting us use bazel_to_cmake in out of tree plugin repositories.