configure_clang.bzl c vs c++
configure_clang.bzl c vs c++

Summary:
On Debian, setting CLANG=/usr/bin/clang-4.0 doesn't work because the include paths are different for C and C++ code, and the clang_configure only collects include paths for C++ code even though it's used to build C code.

$ clang-4.0 -E -xc++ - -v
[...]
#include <...> search starts here:
 /usr/include/clang/4.0.0/include
 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.1/../../../../include/c++/6.2.1

/usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.1/../../../../include/x86_64-linux-gnu/c++/6.2.1

/usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.1/../../../../include/c++/6.2.1/backward
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

$ clang-4.0 -E -xc - -v
[...]
#include <...> search starts here:
 /usr/local/include
 /usr/lib/llvm-4.0/bin/../lib/clang/4.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

$ bazel build //...
[...]
...............
INFO: Found 870 targets...
ERROR: /home/nicholas/kythe/third_party/jq/BUILD:10:1: undeclared inclusion(s) in rule '//third_party/jq:libjq':
this rule is missing dependency declarations for the following files included by 'third_party/jq/jv_unicode.c':
  '/usr/lib/llvm-4.0/lib/clang/4.0.0/include/stddef.h'
  '/usr/lib/llvm-4.0/lib/clang/4.0.0/include/stdarg.h'.
INFO: Elapsed time: 71.923s, Critical Path: 0.55s

You'll note that '/usr/lib/llvm-4.0/lib/clang/4.0.0/include' is in the C include list but not the C++ include list.

Reviewers: jdennett

Reviewed By: jdennett

Differential Revision: https://phabricator-dot-kythe-repo.appspot.com/D1161

kythe/kythe,kythe/kythe,legrosbuffle/kythe,benjyw/kythe,legrosbuffle/kythe,bzz/kythe,benjyw/kythe,kythe/kythe,bzz/kythe,bzz/kythe,legrosbuffle/kythe,bzz/kythe,legrosbuffle/kythe,bzz/kythe,legrosbuffle/kythe,kythe/kythe,benjyw/kythe,bzz/kythe,benjyw/kythe,benjyw/kythe,kythe/kythe,legrosbuffle/kythe,legrosbuffle/kythe,benjyw/kythe,benjyw/kythe,kythe/kythe,bzz/kythe,kythe/kythe,benjyw/kythe,kythe/kythe,benjyw/kythe,bzz/kythe,bzz/kythe,bzz/kythe,legrosbuffle/kythe,benjyw/kythe,bzz/kythe,benjyw/kythe,benjyw/kythe,legrosbuffle/kythe,legrosbuffle/kythe,kythe/kythe,kythe/kythe,bzz/kythe,legrosbuffle/kythe,kythe/kythe