Skip to content

Commit

Permalink
[setup] Upgrade Bazel to 6.0.0 (RobotLocomotion#18545)
Browse files Browse the repository at this point in the history
Co-authored-by: William Allen <[email protected]>
Co-authored-by: Jeremy Nimmer <[email protected]>
  • Loading branch information
3 people authored and Marco A. Gutierrez committed Mar 8, 2023
1 parent 33b4744 commit d026242
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Keep this version number in sync with the Ubuntu deb installed by
# drake/setup/ubuntu/source_distribution/install_prereqs.sh.
USE_BAZEL_VERSION=5.3.1
#
# These files should also be updated:
# drake/tools/workspace/drake_visualizer/image/provision.sh
# drake/tools/wheel/image/provision-base.sh
USE_BAZEL_VERSION=6.0.0
8 changes: 4 additions & 4 deletions doc/_pages/from_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ integration. Any other configurations are provided on a best-effort basis.

| Operating System ⁽²⁾ | Architecture | Python ⁽¹⁾ | Bazel | CMake | C/C++ Compiler ⁽³⁾ | Java |
|------------------------------------|--------------|------------|-------|-------|------------------------------|-------------------------------|
| Ubuntu 20.04 LTS (Focal Fossa) | x86_64 | 3.8 | 5.3 | 3.16 | GCC 9 (default) or Clang 12 | OpenJDK 11 |
| Ubuntu 22.04 LTS (Jammy Jellyfish) | x86_64 | 3.10 | 5.3 | 3.22 | GCC 11 (default) or Clang 12 | OpenJDK 11 |
| macOS Monterey (12) | x86_64 | 3.10 | 5.3 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) |
| macOS Monterey (12) | arm64 | 3.10 | 5.3 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) |
| Ubuntu 20.04 LTS (Focal Fossa) | x86_64 | 3.8 | 6.0 | 3.16 | GCC 9 (default) or Clang 12 | OpenJDK 11 |
| Ubuntu 22.04 LTS (Jammy Jellyfish) | x86_64 | 3.10 | 6.0 | 3.22 | GCC 11 (default) or Clang 12 | OpenJDK 11 |
| macOS Monterey (12) | x86_64 | 3.10 | 6.0 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) |
| macOS Monterey (12) | arm64 | 3.10 | 6.0 | 3.24 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) |

⁽¹⁾ CPython is the only Python implementation supported.

Expand Down
6 changes: 3 additions & 3 deletions setup/ubuntu/source_distribution/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ if [[ $(arch) = "aarch64" ]]; then
fi
else
dpkg_install_from_wget \
bazel 5.3.1 \
https://releases.bazel.build/5.3.1/release/bazel_5.3.1-linux-x86_64.deb \
1e939b50d90f68d30fa4f3c12dfdf31429b83ddd8076c622429854f64253c23d
bazel 6.0.0 \
https://releases.bazel.build/6.0.0/release/bazel_6.0.0-linux-x86_64.deb \
b27749e59d7d57d9cf6ca0edce7fbd26bb677797217429052d62ee0f2d008b35
fi
10 changes: 10 additions & 0 deletions tools/skylark/drake_cc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,11 @@ def drake_cc_binary(
linkshared = linkshared,
linkstatic = linkstatic,
linkopts = linkopts,
features = [
# We should deduplicate symbols while linking (for a ~6% reduction
# in disk use), to conserve space in CI; see #18545 for details.
"-no_deduplicate",
],
**kwargs
)

Expand Down Expand Up @@ -804,6 +809,11 @@ def drake_cc_test(
args = args,
deps = deps + add_deps,
copts = new_copts,
features = [
# We should deduplicate symbols while linking (for a ~6% reduction
# in disk use), to conserve space in CI; see #18545 for details.
"-no_deduplicate",
],
**kwargs
)

Expand Down
2 changes: 1 addition & 1 deletion tools/wheel/image/provision-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

set -eu -o pipefail

readonly BAZEL_VERSION=5.1.0
readonly BAZEL_VERSION=6.0.0
readonly BAZEL_ROOT=https://github.com/bazelbuild/bazel/releases/download

# Fix ssh permissions.
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace/drake_visualizer/image/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu -o pipefail

export DEBIAN_FRONTEND=noninteractive

readonly BAZEL_VERSION=5.1.0
readonly BAZEL_VERSION=6.0.0
readonly BAZEL_ROOT=https://github.com/bazelbuild/bazel/releases/download

# Install prerequisites.
Expand Down
12 changes: 12 additions & 0 deletions tools/workspace/dreal/patches/pull18545.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
See https://github.com/RobotLocomotion/drake/pull/18545 for details
about this patch.

--- tools/dreal.bzl.orig
+++ tools/dreal.bzl
@@ -65,7 +65,6 @@
return select({
"//tools:gcc_build": GCC_FLAGS + extra_gcc_flags + rule_copts,
"//tools:clang_build": CLANG_FLAGS + rule_copts,
- "//tools:apple": CLANG_FLAGS + rule_copts,
"//conditions:default": CXX_FLAGS + rule_copts,
})
1 change: 1 addition & 0 deletions tools/workspace/dreal/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def dreal_repository(
":patches/platforms.patch",
":patches/pull283.patch",
":patches/warnings.patch",
":patches/pull18545.patch",
],
repo_mapping = {
"@nlopt": "@nlopt_internal",
Expand Down

0 comments on commit d026242

Please sign in to comment.