Skip to content
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

rm version from toolchain names #73

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
build --incompatible_enable_cc_toolchain_resolution
build --action_env="BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"

build:clang16 --extra_toolchains=//toolchain:clang16
build:gcc12 --extra_toolchains=//toolchain:gcc12
build:clang --extra_toolchains=//toolchain:clang
build:gcc --extra_toolchains=//toolchain:gcc

build:clang-format --aspects @bazel_clang_format//:defs.bzl%clang_format_aspect
build:clang-format --@bazel_clang_format//:binary=@llvm_16_toolchain//:clang-format
build:clang-format --@bazel_clang_format//:binary=@llvm_toolchain//:clang-format
build:clang-format --@bazel_clang_format//:config=//:format_config
build:clang-format --output_groups=report
build:clang-format --keep_going

build:clang-tidy-base --config=clang16
build:clang-tidy-base --config=clang
build:clang-tidy-base --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect
build:clang-tidy-base --@bazel_clang_tidy//:clang_tidy_config=//:tidy_config
build:clang-tidy-base --output_groups=report
Expand All @@ -20,7 +20,7 @@ build:verbose-clang-tidy --config=clang-tidy-base
build:verbose-clang-tidy --@bazel_clang_tidy//:clang_tidy_executable=//tools:verbose-clang-tidy

build:clang-tidy --config=clang-tidy-base
build:clang-tidy --@bazel_clang_tidy//:clang_tidy_executable=@llvm_16_toolchain//:clang-tidy
build:clang-tidy --@bazel_clang_tidy//:clang_tidy_executable=@llvm_toolchain//:clang-tidy

try-import %workspace%/user.bazelrc

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: [gcc12, clang16]
toolchain: [gcc, clang]
feature: ['', asan, tsan, ubsan]

steps:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: [gcc12, clang16]
toolchain: [gcc, clang]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"--compile-commands-dir=${workspaceFolder}/",
"--query-driver=**"
],
"clangd.path": "${workspaceFolder}/external/llvm_16_toolchain_files/bin/clangd"
"clangd.path": "${workspaceFolder}/external/llvm_toolchain_files/bin/clangd"
}
6 changes: 3 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ filegroup(

clang_format_update(
name = "clang-format",
binary = "@llvm_16_toolchain//:clang-format",
binary = "@llvm_toolchain//:clang-format",
config = ":format_config",
)

clang_tidy_apply_fixes(
name = "clang-tidy-fix",
apply_replacements_binary = "@llvm_16_toolchain//:clang-apply-replacements",
tidy_binary = "@llvm_16_toolchain//:clang-tidy",
apply_replacements_binary = "@llvm_toolchain//:clang-apply-replacements",
tidy_binary = "@llvm_toolchain//:clang-tidy",
tidy_config = ":tidy_config",
)

Expand Down
10 changes: 5 additions & 5 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ load("@bazel_bootlin//:defs.bzl", "bootlin_toolchain")
# for mapping from buildroot version to gcc version
# see https://toolchains.bootlin.com/releases_x86-64.html
bootlin_toolchain(
name = "gcc_12_toolchain",
name = "gcc_toolchain",
architecture = "x86-64",
buildroot_version = "bleeding-edge-2022.08-1",
extra_cxx_flags = [
Expand Down Expand Up @@ -83,7 +83,7 @@ llvm_toolchain_dependencies()
load("//tools:llvm_toolchain.bzl", "llvm_toolchain")

llvm_toolchain(
name = "llvm_16_toolchain",
name = "llvm_toolchain",
cxx_flags = {
"": [
"-stdlib=libc++",
Expand All @@ -98,17 +98,17 @@ llvm_toolchain(
link_libs = {
"": ["-fsanitize-link-c++-runtime"],
},
linux_x86_64_sysroot = "@gcc_12_toolchain_files//x86_64-buildroot-linux-gnu/sysroot",
linux_x86_64_sysroot = "@gcc_toolchain_files//x86_64-buildroot-linux-gnu/sysroot",
llvm_version = "16.0.4",
)

# register llvm first, it has better error messages
load("@llvm_16_toolchain//:toolchains.bzl", "llvm_register_toolchains")
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")

llvm_register_toolchains()

register_toolchains(
"@gcc_12_toolchain//:toolchain",
"@gcc_toolchain//:toolchain",
)

BOOST_UT_VERSION = "e53a47d37bc594e80bd5f1b8dc1ade8dce4429d3"
Expand Down
10 changes: 5 additions & 5 deletions toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ cc_binary(
)

alias(
name = "gcc12",
actual = "@gcc_12_toolchain//:toolchain",
name = "gcc",
actual = "@gcc_toolchain//:toolchain",
)

alias(
name = "clang16",
name = "clang",
actual = select({
"@platforms//os:macos": "@llvm_16_toolchain//:cc-toolchain-aarch64-darwin",
"//conditions:default": "@llvm_16_toolchain//:cc-toolchain-x86_64-linux",
"@platforms//os:macos": "@llvm_toolchain//:cc-toolchain-aarch64-darwin",
"//conditions:default": "@llvm_toolchain//:cc-toolchain-x86_64-linux",
}),
)

Expand Down
6 changes: 3 additions & 3 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ genrule(
cmd = """
echo "$$(dirname $@)/../$(rootpath {tidy}) --enable-check-profile \\$$@" > $@
""".format(
tidy = "@llvm_16_toolchain//:clang-tidy",
tidy = "@llvm_toolchain//:clang-tidy",
),
executable = True,
tools = ["@llvm_16_toolchain//:clang-tidy"],
tools = ["@llvm_toolchain//:clang-tidy"],
)

sh_binary(
name = "verbose-clang-tidy",
srcs = ["verbose-clang-tidy.sh"],
data = ["@llvm_16_toolchain//:clang-tidy"],
data = ["@llvm_toolchain//:clang-tidy"],
)
Loading