Skip to content

Commit fd617fc

Browse files
authored
cleanup: remove gRPC+macOS workaround (googleapis#10966)
Modern versions of gRPC no longer need `-DGRPC_BAZEL_BUILD` on macOS.
1 parent bc44b1b commit fd617fc

105 files changed

Lines changed: 0 additions & 527 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
# NOTE: This file is not loaded if google-cloud-cpp is built as part of a
1616
# larger project.
1717

18-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
19-
# and there is (AFAIK) no way to "inherit" their definitions.
20-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
21-
build --copt=-DGRPC_BAZEL_BUILD
22-
2318
# Use host-OS-specific config lines from bazelrc files.
2419
build --enable_platform_specific_config=true
2520

ci/kokoro/macos/builds/bazel.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export USE_BAZEL_VERSION
2828
bazelisk version || rm -fr "$HOME"/Library/Caches/bazelisk || bazelisk version
2929

3030
bazel_args=(
31-
# On macOS gRPC does not compile correctly unless one defines this:
32-
"--copt=-DGRPC_BAZEL_BUILD"
3331
# We need this environment variable because on macOS gRPC crashes if it
3432
# cannot find the credentials, even if you do not use them. Some of the
3533
# unit tests do exactly that.

ci/kokoro/macos/builds/quickstart-bazel.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ bazelisk version || rm -fr "$HOME"/Library/Caches/bazelisk || bazelisk version
3333
bazelisk shutdown
3434

3535
bazel_args=(
36-
# On macOS gRPC does not compile correctly unless one defines this:
37-
"--copt=-DGRPC_BAZEL_BUILD"
3836
# We need this environment variable because on macOS gRPC crashes if it
3937
# cannot find the credentials, even if you do not use them. Some of the
4038
# unit tests do exactly that.

ci/verify_current_targets/.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
16-
# and there is (AFAIK) no way to "inherit" their definitions.
17-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
18-
build --copt=-DGRPC_BAZEL_BUILD
19-
2015
# Use host-OS-specific config lines from bazelrc files.
2116
build --enable_platform_specific_config=true
2217

ci/verify_deprecated_targets/.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
16-
# and there is (AFAIK) no way to "inherit" their definitions.
17-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
18-
build --copt=-DGRPC_BAZEL_BUILD
19-
2015
# Use host-OS-specific config lines from bazelrc files.
2116
build --enable_platform_specific_config=true
2217

generator/internal/scaffold_generator.cc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -827,14 +827,6 @@ curl -Lo roots.pem https://pki.google.com/roots.pem
827827
export GRPC_DEFAULT_SSL_ROOTS_FILE_PATH="$$PWD/roots.pem"
828828
```
829829
830-
To workaround a [bug in Bazel][bazel-grpc-macos-bug], gRPC requires this flag on
831-
macOS builds, you can add the option manually or include it in your `.bazelrc`
832-
file:
833-
834-
```bash
835-
bazel build --copt=-DGRPC_BAZEL_BUILD ...
836-
```
837-
838830
### Windows
839831
840832
Bazel tends to create very long file names and paths. You may need to use a
@@ -1062,11 +1054,6 @@ void GenerateQuickstartBazelrc(
10621054
# See the License for the specific language governing permissions and
10631055
# limitations under the License.
10641056
1065-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
1066-
# and there is (AFAIK) no way to "inherit" their definitions.
1067-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
1068-
build --copt=-DGRPC_BAZEL_BUILD
1069-
10701057
# Use host-OS-specific config lines from bazelrc files.
10711058
build --enable_platform_specific_config=true
10721059

google/cloud/accessapproval/quickstart/.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
16-
# and there is (AFAIK) no way to "inherit" their definitions.
17-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
18-
build --copt=-DGRPC_BAZEL_BUILD
19-
2015
# Use host-OS-specific config lines from bazelrc files.
2116
build --enable_platform_specific_config=true
2217

google/cloud/accesscontextmanager/quickstart/.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
16-
# and there is (AFAIK) no way to "inherit" their definitions.
17-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
18-
build --copt=-DGRPC_BAZEL_BUILD
19-
2015
# Use host-OS-specific config lines from bazelrc files.
2116
build --enable_platform_specific_config=true
2217

google/cloud/advisorynotifications/quickstart/.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
16-
# and there is (AFAIK) no way to "inherit" their definitions.
17-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
18-
build --copt=-DGRPC_BAZEL_BUILD
19-
2015
# Use host-OS-specific config lines from bazelrc files.
2116
build --enable_platform_specific_config=true
2217

google/cloud/apigateway/quickstart/.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
16-
# and there is (AFAIK) no way to "inherit" their definitions.
17-
# [1]: https://github.com/bazelbuild/bazel/issues/4341
18-
build --copt=-DGRPC_BAZEL_BUILD
19-
2015
# Use host-OS-specific config lines from bazelrc files.
2116
build --enable_platform_specific_config=true
2217

0 commit comments

Comments
 (0)