diff --git a/.bazelrc b/.bazelrc index e8828ee87518..7ba7162770b3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -37,7 +37,7 @@ build:crosslinuxarm '--workspace_status_command=./build/bazelutil/stamp.sh aarch build:crosslinuxarm --config=cross # developer configurations. Add e.g. --config=devdarwinx86_64 to turn these on. -build:devdarwinx86_64 --crosstool_top=@toolchain_dev_darwin_x86-64//:suite +build:devdarwinx86_64 --platforms=//build/toolchains:darwin_x86_64 # NOTE(ricky): This is consumed in `BUILD` files (see # `build/toolchains/BUILD.bazel`). build:devdarwinx86_64 --config=dev diff --git a/WORKSPACE b/WORKSPACE index 99aa1a22ceed..da7802dc2e40 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -370,6 +370,7 @@ register_toolchains( "//build/toolchains:cross_linux_arm_toolchain", "//build/toolchains:cross_macos_toolchain", "//build/toolchains:cross_windows_toolchain", + "//build/toolchains:dev_darwin_x86_64_toolchain", ) http_archive( diff --git a/build/toolchains/BUILD.bazel b/build/toolchains/BUILD.bazel index 89c0af2d99ca..eb7b0673e23f 100644 --- a/build/toolchains/BUILD.bazel +++ b/build/toolchains/BUILD.bazel @@ -86,6 +86,31 @@ platform( ], ) +toolchain( + name = "dev_darwin_x86_64_toolchain", + exec_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], + target_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], + target_settings = [ + ":dev", + ], + toolchain = "@toolchain_dev_darwin_x86-64//:toolchain", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", +) + +platform( + name = "darwin_x86_64", + constraint_values = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], +) + config_setting( name = "dbg_crdb_test", define_values = {