-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Tested with bazel-0.6.0. This is basically a variation on #209, but with a different flag.
This issue continues to cause problems for https://github.com/envoyproxy/envoy. We currently have a workaround for #209 that works with 0.5.4 but not 0.6.0.
The bug is trivially reproducible with the bazelbuild examples repository:
$ git clone https://github.com/bazelbuild/examples
$ cd examples/cpp-tutorial/stage1
$ bazel build //main:hello-world.stripped
INFO: Found 1 target...
ERROR: /Users/stephan/workspace/examples/cpp-tutorial/stage1/main/BUILD:1:1: Stripping main/hello-world.stripped for //main:hello-world failed (Exit 1).
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: only one -R option allowed
Target //main:hello-world.stripped failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.078s, Critical Path: 0.40s
Using --verbose_failures shows that strip command is
/usr/bin/strip -S -o bazel-out/darwin_x86_64-fastbuild/bin/main/hello-world.stripped -R .gnu.switches.text.quote_paths -R .gnu.switches.text.bracket_paths -R .gnu.switches.text.system_paths -R .gnu.switches.text.cpp_defines -R .gnu.switches.text.cpp_includes -R .gnu.switches.text.cl_args -R .gnu.switches.text.lipo_info -R .gnu.switches.text.annotation bazel-out/darwin_x86_64-fastbuild/bin/main/hello-world
Xcode's strip command does not accept section names for the -R flag. It's a flag for specifying a file containing symbol names to be stripped.
Environment info
-
Operating System:
macOS Sierra 10.12.6, XCode 8.3.3 -
Bazel version (output of
bazel info release):
release 0.6.0- (@Non-Git) -
If
bazel info releasereturns "development version" or "(@Non-Git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD):
Compiled from the distribution at https://github.com/bazelbuild/bazel/releases/download/0.6.0/bazel-0.6.0-dist.zip