Skip to content

Commit

Permalink
[workspace] Adjust apple_support for Bazel 7 compatibility (RobotLoco…
Browse files Browse the repository at this point in the history
…motion#21116)

This re-applies f2187b3 (by reverting the 5a35be0 revert).

For macOS users building from source, Bazel 7 now requires a snippet
to be added directly to WORKSPACE (not our default.bzl), or to the
MODULE.bazel. Downstream projects using drake_bazel_external on macOS
will need to mimic this same change (or similar), per instructions at
https://github.com/bazelbuild/apple_support#toolchain-setup.
  • Loading branch information
jwnimmer-tri authored Mar 9, 2024
1 parent 247ba2d commit 43c80d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ load("//tools/workspace:default.bzl", "add_default_workspace")

add_default_workspace()

load("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure")

apple_cc_configure()

# Add some special heuristic logic for using CLion with Drake.
load("//tools/clion:repository.bzl", "drake_clion_environment")

Expand Down
4 changes: 4 additions & 0 deletions cmake/WORKSPACE.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ _BAZEL_WORKSPACE_EXCLUDES = split_cmake_list("@BAZEL_WORKSPACE_EXCLUDES@")
add_default_workspace(
repository_excludes = ["python"] + _BAZEL_WORKSPACE_EXCLUDES,
)

load("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure")

apple_cc_configure()

0 comments on commit 43c80d5

Please sign in to comment.