I gave it a quick try for Kythe and encountered some problems. No doubt some are local, but there are definitely a few that need fixes upstream:
First hurdle (trivial fix, use +):
ERROR: .../external/bazel_tools/tools/cpp/cc_configure.bzl:228:80: Implicit string concatenation is forbidden, use the + operator.
ERROR: .../external/bazel_tools/tools/cpp/cc_configure.bzl:229:11: syntax error at '" variable"': expected ,
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension 'tools/cpp/cc_configure.bzl' has errors.
Second hurdle (another trivial fix, the script is call osx_cc_wrapper.sh.tpl, not gcc):
ERROR: .../external/bazel_tools/tools/cpp/cc_configure.bzl:254:3: no such package '@local_config_cc//': Traceback (most recent call last):
File ".../external/bazel_tools/tools/cpp/cc_configure.bzl", line 237
_tpl(ctx, "osx_gcc_wrapper.sh", {"%{cc}":...)})
File ".../external/bazel_tools/tools/cpp/cc_configure.bzl", line 220, in _tpl
ctx.template(tpl, Label("@bazel_tools//tools/cp...), ...)
Not a file: .../external/bazel_tools/tools/cpp/osx_gcc_wrapper.sh.tpl and referenced by '//external:cc_toolchain'.
ERROR: Loading failed; build aborted.
Final hurdles:
$ bazel build //kythe/cxx/common:all
Extracting Bazel installation...
Sending SIGTERM to previous Bazel server (pid=17068)... done.
..........
ERROR: No toolchain found for cpu 'k8'. Valid cpus are: [
local,
armeabi-v7a,
].
After removing my local .bazelrc with contents:
$ cat ~/.bazelrc
build --package_path %workspace%:/home/shahms/src/bazel/base_workspace
fetch --package_path %workspace%:/home/shahms/src/bazel/base_workspace
query --package_path %workspace%:/home/shahms/src/bazel/base_workspace
$ bazel build --cpu=local //kythe/cxx/common:all
ERROR: Loading of target '//tools/cpp:toolchain' failed; build aborted: no such package 'tools/cpp': BUILD file not found on package path.
ERROR: Loading failed; build aborted.
And:
$ bazel build //kythe/cxx/common:all
ERROR: /home/shahms/src/kythe/tools/defaults/BUILD:11:1: no such package 'tools/cpp': BUILD file not found on package path and referenced by '//tools/defaults:crosstool'.
ERROR: Loading of target '//tools/cpp:toolchain' failed; build aborted: no such package 'tools/cpp': BUILD file not found on package path.
ERROR: Loading failed; build aborted.
(It's worth pointing out that the BUILD-path referenced above doesn't exist)
Very happy to see progress on this front, though :-)
--Shahms