-
Notifications
You must be signed in to change notification settings - Fork 99
Bump Bazel version to 8.3.1, migrate to bzlmod and bump LLVM to latest #49
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e2f5e5b
Bump Bazel version to 8.3.1 and migrate to bzlmod
SihaoLiu 90a3902
Bazel build and test all works
SihaoLiu d749983
disable ccache for common build
SihaoLiu 9b2cbd9
keep only one line that needed by bzlmod
SihaoLiu 0c0981b
more edits
SihaoLiu a73c623
remove personal Claude dev
SihaoLiu 9ba025b
override LLVM target to speed up build
SihaoLiu 449dc71
removed since upgraded to bzlmod
SihaoLiu 49a5db9
bump llvm to latest version
SihaoLiu 70a0cfc
Merge branch 'upstream'
SihaoLiu fbbe6a5
bringup TARGET selections to speed up build
SihaoLiu e5f2997
import_llvm.bzl now in extensions.bzl
SihaoLiu c979b0b
minor comments removed from extensions.bzl since import_llvm.bzl does…
SihaoLiu 2b4ad44
remove empty bazel/BUILD
SihaoLiu 5f5dec6
weird quirk that we need empty BUILD file to run
SihaoLiu 56697c4
Bufferization to BufferizePass
SihaoLiu 7b836d4
update LLVM submodule version used by cmake flow and update CI to use…
SihaoLiu 0ec6f2c
Merge pull request #1 from SihaoLiu/update-cmake-llvm-github-ci
SihaoLiu 67540d7
choose a CI passed LLVM version d9190f8141661bd6120dea61d28ae8940fd775d0
SihaoLiu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.4.0 | ||
8.3.1 |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
############################################################################### | ||
# Bazel now uses Bzlmod by default to manage external dependencies. | ||
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. | ||
# | ||
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 | ||
############################################################################### | ||
|
||
module( | ||
name = "mlir_tutorial", | ||
version = "1.0.0", | ||
repo_name = "mlir_tutorial", | ||
) | ||
|
||
# Dependencies available in BCR | ||
bazel_dep(name = "bazel_skylib", version = "1.7.1") | ||
bazel_dep(name = "rules_python", version = "1.2.0") | ||
bazel_dep(name = "platforms", version = "0.0.11") | ||
bazel_dep(name = "rules_cc", version = "0.1.1") | ||
bazel_dep(name = "rules_java", version = "8.12.0") | ||
bazel_dep(name = "protobuf", version = "30.1") | ||
bazel_dep(name = "rules_proto", version = "7.1.0") | ||
bazel_dep(name = "rules_pkg", version = "1.1.0") | ||
bazel_dep(name = "re2", version = "2024-07-02.bcr.1") | ||
bazel_dep(name = "abseil-cpp", version = "20250512.1") | ||
bazel_dep(name = "or-tools", version = "9.12") | ||
bazel_dep(name = "eigen", version = "4.0.0-20241125.bcr.2") | ||
bazel_dep(name = "highs", version = "1.11.0") | ||
bazel_dep(name = "pcre2", version = "10.46-DEV") | ||
bazel_dep(name = "glpk", version = "5.0.bcr.4") | ||
bazel_dep(name = "bliss", version = "0.73") | ||
bazel_dep(name = "scip", version = "9.2.0.bcr.3") | ||
bazel_dep(name = "zlib-ng", version = "2.0.7") | ||
|
||
# Hedron's Compile Commands Extractor for Bazel | ||
# https://github.com/hedronvision/bazel-compile-commands-extractor | ||
bazel_dep(name = "hedron_compile_commands", dev_dependency = True) | ||
git_override( | ||
module_name = "hedron_compile_commands", | ||
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git", | ||
commit = "0e990032f3c5a866e72615cf67e5ce22186dcb97", | ||
# Replace the commit hash (above) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main). | ||
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README). | ||
) | ||
|
||
# Use module extensions for LLVM and other dependencies that aren't in BCR | ||
mlir_tutorial_deps = use_extension("//:extensions.bzl", "mlir_tutorial_deps") | ||
use_repo(mlir_tutorial_deps, | ||
"llvm-raw", | ||
"llvm_zstd", | ||
"llvm_zlib" | ||
) | ||
|
||
# The subset of LLVM backend targets that should be compiled | ||
_LLVM_TARGETS = [ | ||
"X86", | ||
# The bazel dependency graph for mlir-opt fails to load (at the analysis | ||
# step) without the NVPTX target in this list, because mlir/test:TestGPU | ||
# depends on the //llvm:NVPTXCodeGen target, which is not defined unless this | ||
# is included. @j2kun asked the LLVM maintiners for tips on how to fix this, | ||
# see https://github.com/llvm/llvm-project/issues/63135 | ||
"NVPTX", | ||
# Needed for Apple M1 targets, see | ||
# https://github.com/j2kun/mlir-tutorial/issues/11 | ||
"AArch64", | ||
] | ||
|
||
# Configure LLVM project using use_repo_rule | ||
llvm_configure = use_repo_rule("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") | ||
llvm_configure( | ||
name = "llvm-project", | ||
targets = _LLVM_TARGETS, | ||
) | ||
|
||
# Configure Python dependencies | ||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
python.toolchain(python_version = "3.13") | ||
use_repo(python, "python_3_13") | ||
|
||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") | ||
pip.parse( | ||
hub_name = "mlir_tutorial_pip_deps", | ||
python_version = "3.13", | ||
requirements_lock = "//:requirements.txt", | ||
) | ||
use_repo(pip, "mlir_tutorial_pip_deps") |
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.