Skip to content

Commit

Permalink
update llvm toolchain repo (#131)
Browse files Browse the repository at this point in the history
Change-Id: I033a4b201c72fe43e70702eed3c4098666398c1d
  • Loading branch information
garymm authored Mar 10, 2024
1 parent 51a2ddb commit e9ddce1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ workspace(name = "starflate")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

COMMON_CXX_FLAGS = ["-march=native"]
COMMON_CXX_FLAGS = [
"-march=native",
"-std=c++23",
]

COMMON_CXX_WARNINGS = [
"-Werror",
Expand Down Expand Up @@ -88,7 +91,6 @@ bootlin_toolchain(
buildroot_version = "bleeding-edge-2023.08-1",
extra_cxx_flags = [
"-fdiagnostics-color=always",
"-std=c++23",
"-Wduplicated-cond",
"-Wduplicated-branches",
"-Wlogical-op",
Expand All @@ -98,13 +100,13 @@ bootlin_toolchain(
libc_impl = "glibc",
)

BAZEL_TOOLCHAIN_VERSION = "ade23e0e37c5308162c012a4f4224459c1c4fa22"
TOOLCHAINS_LLVM_VERSION = "bba94f8138ab454d70afcd263788b34e2801e2ba"

http_archive(
name = "bazel_toolchain",
sha256 = "968e507ce913b93971aeb77b4b0a96f7b59b1f51cbaae57aefef4c573776ed56",
strip_prefix = "bazel-toolchain-%s" % BAZEL_TOOLCHAIN_VERSION,
url = "https://github.com/grailbio/bazel-toolchain/archive/%s.tar.gz" % BAZEL_TOOLCHAIN_VERSION,
name = "toolchains_llvm",
integrity = "sha256-IyBbm0rakJat7jSGvZ65xVGS2xQQhbXvmx8Q5EA5wlA=",
strip_prefix = "toolchains_llvm-%s" % TOOLCHAINS_LLVM_VERSION,
url = "https://github.com/bazel-contrib/toolchains_llvm/archive/%s.tar.gz" % TOOLCHAINS_LLVM_VERSION,
)

load("//tools:llvm_toolchain_dependencies.bzl", "llvm_toolchain_dependencies")
Expand All @@ -118,7 +120,6 @@ llvm_toolchain(
cxx_flags = {
"": [
"-stdlib=libc++",
"-std=c++23",
"-Wshadow",
] + COMMON_CXX_FLAGS + COMMON_CXX_WARNINGS + LLVM_COLOR_FLAGS,
},
Expand Down
4 changes: 2 additions & 2 deletions tools/llvm_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ instead of the system installed libraries.
"""

load(
"@bazel_toolchain//toolchain:deps.bzl",
"@toolchains_llvm//toolchain:deps.bzl",
_llvm_toolchain_dependencies = "bazel_toolchain_dependencies",
)
load(
"@bazel_toolchain//toolchain:rules.bzl",
"@toolchains_llvm//toolchain:rules.bzl",
_llvm_toolchain = "llvm_toolchain",
_llvm_toolchain_files = "llvm",
)
Expand Down
2 changes: 1 addition & 1 deletion tools/llvm_toolchain_dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Provides a wrapper around `bazel_toolchain_dependencies` which also obtains the
abspath to Bazel's external directory for use by the `llvm_toolchain` wrapper.
"""

load("@bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies")
load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
load("//tools:local_config_info.bzl", "local_config_info")

# Rename to (hopefully) be less confusing
Expand Down

0 comments on commit e9ddce1

Please sign in to comment.