graydon/rust — Issue #1311: llvm-config sometimes doesn't provide the correct include directory
Author: brson
Created: 2011-12-15 23:56:31+00:00
State: open
Labels: bug, build, llvm, unassigned

llvm-config --cxxflags looks like this for me:

```
-I/home/banderson/Dev/rust/src/llvm/include -I/home/banderson/Dev/rust/build/llvm/x86_64-unknown-linux-gnu/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual
```

Critically, our build depends on that first include directory, under the source tree, for rustllvm. In some environments llvm-config doesn't give us that information, probably because it isn't realizing that it's being run out of the build directory.