bazel: fix the compilation of .proto on Darwin (#63879)

On Darwin, the last argument to GCC is coming up as an empty string.
This is breaking the build of proto_library targets. However, I was not
able to reproduce with the example cpp project[0].

This commit patches the cc_wrapper of Bazel that gets installed on
Darwin to remove the last argument if it's an empty string. This is
not a probem on Linux.

[0]: https://github.com/bazelbuild/examples/tree/master/cpp-tutorial/stage3
This commit is contained in:
Wael Nasreddine
2019-06-29 11:07:21 -07:00
committed by GitHub
parent 95165e03f0
commit c49b7f64d1
5 changed files with 252 additions and 6 deletions

View File

@@ -45,7 +45,6 @@ let
bazelScript = ''
${bazel}/bin/bazel \
run \
--host_javabase='@local_jdk//:jdk' \
//python:bin
'';
};