jyasskin@enki:~/opensource/llvm/oprof/dbg$ cat test_config.cc #include "llvm/Module.h" int main() { } jyasskin@enki:~/opensource/llvm/oprof/dbg$ ./Debug/bin/llvm-config --cxxflags -I/usr/local/google/jyasskin/llvm/oprof/dbg/../src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fPIC -Woverloaded-virtual jyasskin@enki:~/opensource/llvm/oprof/dbg$ g++ -c test_config.cc `./Debug/bin/llvm-config --cxxflags` 2>&1|head -20 In file included from /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/Value.h:18, from /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/User.h:22, from /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/Constant.h:17, from /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/GlobalValue.h:21, from /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/Function.h:21, from /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/Module.h:18, from test_config.cc:1: /usr/local/google/jyasskin/llvm/oprof/dbg/../src/include/llvm/Use.h:29:31: error: llvm/ADT/iterator.h: No such file or directory ... jyasskin@enki:~/opensource/llvm/oprof/dbg$ ls include/llvm/ADT/iterator.h include/llvm/ADT/iterator.h If llvm-config --cxxflags included "-I/usr/local/google/jyasskin/llvm/oprof/dbg/include", this would compile successfully.
Created attachment 3143 [details] Proposed fix In srcdir==objdir builds, this will result in a duplicate -I argument, but that doesn't break anything.
Fixed by r74956.