Skip to content

Commit

Permalink
add llvm toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Jul 4, 2024
1 parent 9e72496 commit ead37d4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,19 @@ bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "yaml-cpp", version = "0.8.0")

bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True)
bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True)
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
commit = "204aa593e002cbd177d30f11f54cff3559110bb9",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(llvm_version = "17.0.6")
use_repo(llvm, "llvm_toolchain")

register_toolchains(
"@llvm_toolchain//:all",
dev_dependency = True,
)
20 changes: 20 additions & 0 deletions test/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
module(name = "bzlws_test")

bazel_dep(name = "bzlws")
local_path_override(module_name = "bzlws", path = "..")

bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True)
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
commit = "204aa593e002cbd177d30f11f54cff3559110bb9",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(llvm_version = "17.0.6")
use_repo(llvm, "llvm_toolchain")

register_toolchains(
"@llvm_toolchain//:all",
dev_dependency = True,
)

0 comments on commit ead37d4

Please sign in to comment.