Skip to content

Commit

Permalink
Use local_config_cc from rules_cc and make it a dev dependency
Browse files Browse the repository at this point in the history
Prepare for changes in Bazel 8, where cc configure scripts have been moved to rules_cc.

PiperOrigin-RevId: 703026686
Change-Id: I44c573bf84a56aed37fca0717e7e1892d7f9a267
  • Loading branch information
Abseil Team authored and copybara-github committed Dec 5, 2024
1 parent 7d96b2e commit 9e3b68a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ platform(
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
"@rules_cc//cc/private/toolchain:clang-cl",
],
)
28 changes: 15 additions & 13 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@ module(
compatibility_level = 1,
)

cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension")
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension", dev_dependency = True)
use_repo(cc_configure, "local_config_cc")

# Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file.

bazel_dep(name = "bazel_skylib",
version = "1.5.0")
bazel_dep(name = "rules_cc", version = "0.0.16")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "0.0.10")

bazel_dep(name = "google_benchmark",
version = "1.8.3",
repo_name = "com_github_google_benchmark",
dev_dependency = True)

bazel_dep(name = "googletest",
version = "1.15.2",
repo_name = "com_google_googletest")
bazel_dep(
name = "google_benchmark",
version = "1.8.3",
dev_dependency = True,
repo_name = "com_github_google_benchmark",
)

bazel_dep(name = "platforms",
version = "0.0.10")
bazel_dep(
name = "googletest",
version = "1.15.2",
repo_name = "com_google_googletest",
)
3 changes: 3 additions & 0 deletions ci/macos_xcode_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ if [[ -n "${ALTERNATE_OPTIONS:-}" ]]; then
cp ${ALTERNATE_OPTIONS:-} absl/base/options.h || exit 1
fi

# Avoid using the system version of google-benchmark.
brew uninstall google-benchmark

${BAZEL_BIN} test ... \
--copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \
--copt="-Werror" \
Expand Down

0 comments on commit 9e3b68a

Please sign in to comment.