---
platforms:
  ubuntu1404:
    shell_commands:
    - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
      android_ndk_repository/android_ndk_repository/' WORKSPACE
    - rm -f WORKSPACE.bak
    build_targets:
    - "//src:bazel"
  macos:
    shell_commands:
    - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
      android_ndk_repository/android_ndk_repository/' WORKSPACE
    - rm -f WORKSPACE.bak
    build_targets:
    - "//src:bazel"
  windows:
    build_flags:
    - "--copt=-w"
    - "--host_copt=-w"
    build_targets:
    - "//src:bazel"

---
platforms:
  ubuntu1404:
    shell_commands:
    - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
      android_ndk_repository/android_ndk_repository/' WORKSPACE
    - rm -f WORKSPACE.bak
    build_targets:
    - "//src:bazel"
    build_flags:
    - "-c"
    - "opt"
  macos:
    shell_commands:
    - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
      android_ndk_repository/android_ndk_repository/' WORKSPACE
    - rm -f WORKSPACE.bak
    build_targets:
    - "//src:bazel"
    build_flags:
    - "-c"
    - "opt"
  windows:
    build_flags:
    - "--copt=-w"
    - "--host_copt=-w"
    - "-c"
    - "opt"
    build_targets:
    - "//src:bazel"

Build bazel release binaries with -c opt.
Build bazel release binaries with -c opt.

This saves ~5MB on every platform, new sizes:
104MB on Linux
107MB on Mac
98MB on Windows

https://github.com/bazelbuild/bazel/pull/7492 will probably land before this and reduce size by another ~10MB, so we should be below 100MB on every platform!

Progress on #6314.

RELNOTES: None

Closes #7494.

PiperOrigin-RevId: 235010390
