Skip to content

Commit

Permalink
Merge pull request #13506 from zhangskz/backport-bazel6-fix
Browse files Browse the repository at this point in the history
Add a release flag to disambiguate between release and local config_s…
  • Loading branch information
zhangskz authored Aug 10, 2023
2 parents 955eb44 + 9195c96 commit 6a04b21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")

package(default_visibility = ["//visibility:public"])

filegroup(name = "empty")

bool_flag(
name = "release",
build_setting_default = False,
)

TOOLCHAINS = {
"osx-x86_64": "cc-compiler-osx-x86_64",
"osx-aarch_64": "cc-compiler-osx-aarch_64",
Expand All @@ -19,7 +25,7 @@ TOOLCHAINS = {

cc_toolchain_suite(
name = "clang_suite",
toolchains = TOOLCHAINS
toolchains = TOOLCHAINS,
)

[
Expand Down Expand Up @@ -50,8 +56,8 @@ cc_toolchain_config(

cc_toolchain_config(
name = "linux-aarch_64-config",
sysroot = "/opt/manylinux/2014/aarch64",
linker_path = "/usr/bin/ld",
sysroot = "/opt/manylinux/2014/aarch64",
target_cpu = "aarch64",
target_full_name = "aarch64-linux-gnu",
)
Expand Down
1 change: 1 addition & 0 deletions toolchain/toolchains.bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build:cross_config --crosstool_top=//toolchain:clang_suite
build:cross_config --//toolchain:release=true
build:cross_config --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

build:linux-aarch_64 --config=cross_config --cpu=linux-aarch_64
Expand Down

0 comments on commit 6a04b21

Please sign in to comment.