Created
September 2, 2024 17:59
-
-
Save depp/712aea59c1699c19a658852db53511a1 to your computer and use it in GitHub Desktop.
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
cc_library( | |
name = "example", | |
srcs = ["file.c"], | |
) |
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
int function(void) { return 3; } |
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
bazel_dep(name = "toolchains_llvm", version = "v1.1.2") | |
git_override( | |
module_name = "toolchains_llvm", | |
commit = "a1a5013732b30b1c0b03e904726106a301913ec0", | |
remote = "https://github.com/bazel-contrib/toolchains_llvm", | |
) | |
# Configure and register the toolchain. | |
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") | |
llvm.toolchain( | |
name = "llvm_toolchain", | |
llvm_version = "18.1.8", | |
) | |
llvm.toolchain_root( | |
name = "llvm_toolchain", | |
path = "/opt/llvm-18", | |
) | |
use_repo(llvm, "llvm_toolchain") | |
register_toolchains("@llvm_toolchain//:all") | |
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
workspace(name = "ltexample") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment