Created
January 26, 2022 08:29
-
-
Save rrbutani/a0a52776d87b026ef1339445070353fd to your computer and use it in GitHub Desktop.
.bazel-cc-macOS-install_name-test
This file contains 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
Fails with and without `llvm_register_toolchains()`. |
This file contains 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
build --incompatible_enable_cc_toolchain_resolution |
This file contains 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
4.2.1 |
This file contains 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_binary( | |
name = "somelib.dylib", | |
linkshared = True, | |
srcs = ["lib.cc"], | |
linkopts = ["-install_name", "@execution_path/../lib/somelib.dylib"], | |
) |
This file contains 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 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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
BAZEL_TOOLCHAIN_TAG = "0.6.3" | |
BAZEL_TOOLCHAIN_SHA = "da607faed78c4cb5a5637ef74a36fdd2286f85ca5192222c4664efec2d529bb8" | |
http_archive( | |
name = "com_grail_bazel_toolchain", | |
sha256 = BAZEL_TOOLCHAIN_SHA, | |
strip_prefix = "bazel-toolchain-{tag}".format(tag = BAZEL_TOOLCHAIN_TAG), | |
canonical_id = BAZEL_TOOLCHAIN_TAG, | |
url = "https://github.com/grailbio/bazel-toolchain/archive/{tag}.tar.gz".format(tag = BAZEL_TOOLCHAIN_TAG), | |
) | |
load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") | |
bazel_toolchain_dependencies() | |
load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain") | |
llvm_toolchain( | |
name = "llvm_toolchain", | |
llvm_version = "13.0.0", | |
) | |
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains") | |
# llvm_register_toolchains() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment