LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 4481 - llvm-config with src!=obj omits -I<obj_dir>/include
Summary: llvm-config with src!=obj omits -I<obj_dir>/include
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-config (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Jeffrey Yasskin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-29 16:37 PDT by Jeffrey Yasskin
Modified: 2009-07-07 17:17 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
Proposed fix (1.54 KB, patch)
2009-07-01 17:32 PDT, Jeffrey Yasskin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Yasskin 2009-06-29 16:37:18 PDT
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.
Comment 1 Jeffrey Yasskin 2009-07-01 17:32:20 PDT
Created attachment 3143 [details]
Proposed fix

In srcdir==objdir builds, this will result in a duplicate -I argument, but that doesn't break anything.
Comment 2 Jeffrey Yasskin 2009-07-07 17:17:43 PDT
Fixed by r74956.