[cfe-dev] Can't build clang-tools-extra using Visual Studio because of missing include directory in tools\extra project files

David Bakin davidbak at gmail.com
Thu Apr 2 00:47:08 PDT 2015


Well, that's interesting.  I did clone the extra tools into
llvm\tools\clang\tools\extra.  The problem was that all of the vcxprojs for
the projects in extra were missing "additional include directories" for the
source tree's tools\clang\include and also the binary tree's
tools\clang\include.  But all other necessary include directories were
there.

The installed CMake is 3.2.1, the compiler is VS 2013 Win64, the config was
Debug, and the llvm/clang/extras are all sync'd to release_36.  LLVM and
Clang build fine (and pass unit tests).  And whatever was causing it, it
was repeatable (blowing away the build output tree, rerunning cmake-gui
with the same settings, and doing another build gave the same result.)

I guess I'll have to try again.  Are there any special cmake configuration
variables you set?  Here's my full list:

LLVM_TARGETS_TO_BUILD=X86
LLVM_ENABLE_ASSERTIONS=On
CLANG_BUILD_EXAMPLES=On
LLVM_COMPILER_JOBS=2

Thanks!

(P.S. is there a way using cmake-gui to save/write the configuration
variable settings so you can restore them the next time you want to
generate VS sln/project files instead of typing them in again?  Or,
alternatively, getting cmake-gui to emit somewhere the actual cmake command
line given the entire configuration you define with it?)

On Wed, Apr 1, 2015 at 10:02 PM, Daniel Dilts <diltsman at gmail.com> wrote:

> I have successfully built 3.5 release, 3.5.1 release, 3.6 release, and
> trunk (today) including LLVM, Clang, and clang extra tools on Windows with
> CMake 3.2 and Visual Studio 2013.  I have never had any issue getting them
> to work.
>
> I checked out llvm to d:\llvm\llvm
> clang to d:\llvm\llvm\tools\clang
> extra tools to d:\llvm\llvm\tools\clang\tools\extra
>
>
>
> On Wed, Apr 1, 2015 at 9:27 PM, Manuel Klimek <klimek at google.com> wrote:
>
>> Here's the original line of patches upstream in which I added the feature:
>> http://www.cmake.org/pipermail/cmake-developers/2011-April/013194.html
>>
>> Cheers,
>> /Manuel
>>
>> On Wed, Apr 1, 2015 at 9:21 PM David Bakin <davidbak at gmail.com> wrote:
>>
>>> Well, I'd be willing to do that if I knew how to do it.  I've patched up
>>> my vcxproj files by hand but have no idea how to get CMake to do it.  Or
>>> possibly it is the module system (module.modulemap)?  If you can point me
>>> at documentation for what's needed I'll get it done.
>>>
>>> On Wed, Apr 1, 2015 at 9:12 PM, Manuel Klimek <klimek at google.com> wrote:
>>>
>>>> I don't think anybody has put in the work yet to make the CMake
>>>> compile-commands work seamlessly on Windows yet. I'd certainly welcome any
>>>> patches thrown my way to help with that ...
>>>>
>>>> On Wed, Apr 1, 2015 at 7:24 PM David Bakin <davidbak at gmail.com> wrote:
>>>>
>>>>> Building llvm+clang+clang-tools-extra at branch release_36 using CMake
>>>>> generated sln/project files for "Visual Studio 12 Win64" I got a bunch of
>>>>> compile errors in various clang-tools-extra projects due to the fact that
>>>>> ...\tools\clang\include isn't one of the "additional include directories"
>>>>> in the vcxproj files for projects in extra.
>>>>>
>>>>> (A quick glance at the commit history since release_36 doesn't show
>>>>> any commit (to my eyes) that would have fixed this (I looked only at the
>>>>> commit message).)
>>>>>
>>>>> So:
>>>>>
>>>>> a) I'd like to report this problem.
>>>>>
>>>>> and
>>>>>
>>>>> b) Is there something simple I can fix in my local working directory
>>>>> so that I can regenerate the sln/project files using CMake and continue?
>>>>>
>>>>> (I would do it myself and submit a fix but unfortunately I have no
>>>>> knowledge as to how CMake is configured.)
>>>>>
>>>>> Thanks! -- David Bakin
>>>>> _______________________________________________
>>>>> cfe-dev mailing list
>>>>> cfe-dev at cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>>>
>>>>
>>>
>> _______________________________________________
>> 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/20150402/33792759/attachment.html>


More information about the cfe-dev mailing list