[cfe-dev] Getting clang header search path

Nikola Smiljanic popizdeh at gmail.com
Fri Aug 15 20:26:16 PDT 2014


Yeah this is one of those "known problems". MinGW never had a proper
toolchain implemented, I think Ruben was working on this. Include paths
come from hardcoded versions listed in InitHeaderSearch.cpp.


On Sat, Aug 16, 2014 at 11:12 AM, Edward Diener <
eldlistmailingz at tropicsoft.com> wrote:

> On 8/15/2014 10:23 AM, Craig Tenenbaum wrote:
>
>> On Fri, Aug 15, 2014 at 9:28 AM, Edward Diener
>> <eldlistmailingz at tropicsoft.com
>> <mailto:eldlistmailingz at tropicsoft.com>> wrote:
>>
>>     Here is my output:
>>
>>         C:\Programming\VersionControl\__bninja_installed_clang\bin>_
>> _clang++
>>
>>         -E -v -### -x c
>>         ++ NUL
>>
>>         clang version 3.6.0 (215674)
>>         Target: i686-pc-windows-gnu
>>         Thread model: posix
>>           "C:\\Programming\\__VersionControl\\bninja___
>> installed_clang\\bin\\clang++.__exe" "-c
>>
>>         c1" "-triple" "i686-pc-windows-gnu" "-E" "-disable-free"
>>         "-disable-llvm-verifier
>>         " "-main-file-name" "NUL" "-mrelocation-model" "static"
>>         "-mdisable-fp-elim" "-fm
>>         ath-errno" "-masm-verbose" "-mconstructor-aliases" "-target-cpu"
>>         "pentium4" "-v"
>>           "-dwarf-column-info" "-resource-dir"
>>         "C:\\Programming\\__VersionControl\\bninja_i
>>         nstalled_clang\\bin\\..\\lib\\__clang\\3.6.0"
>>         "-fdeprecated-macro" "-fdebug-compil
>>         ation-dir"
>>         "C:\\Programming\\__VersionControl\\bninja___
>> installed_clang\\bin"
>>
>>         "-ferr
>>         or-limit" "19" "-fmessage-length" "80" "-mstackrealign"
>>         "-fno-use-cxa-atexit" "-
>>         fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions"
>>         "-fdiagnostics-show-option"
>>           "-fcolor-diagnostics" "-o" "-" "-x" "c++" "NUL"
>>
>>
>>     I do not see header path information anywhere.
>>
>> Sorry, my bad, try: clang++ -E -v -x c++ NUL
>>
>
> Bingo ! That gives me the output I expected.
>
> But it is looking in all sorts of non-existent directories related to gcc
> versions 4.7.0 through 4.8.2, which of course don't exist since I used
> mingw64 gcc-4.9.1 32-bit to build clang. And therefore it does not find the
> C++ standard libraries of gcc-4.9.1.
>
> I can switch to mingw gcc-4.8.1 and hopefully that will work after I
> rebuild the latest clang.
>
> The moral of the story is that building clang from source on Windows
> targeting gcc will not work with gcc outside the 4.7.0 to 4.8.2 range. I
> wish such simple things were documented somewhere in clang documentation.
>
> Did I miss it ? Is there any clang table which specifies which clang
> versions depend on which gcc version ranges ?
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140816/51ec9b38/attachment.html>


More information about the cfe-dev mailing list