<div dir="ltr">Okay, that looks good, thanks. A small point:<div><br></div><div>> <span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)">Extract the MSYS zip file. Add /c/MSys to your bash profile or path.</span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)"><br></span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)">> </span><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)">Add /c/MinGW to your bash profile or path.</span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)"><br></span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)">did you mean /c/msys/bin and /c/mingw/bin?</span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)"><br></span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)">I ran the process overnight, and got this error</span></div><div><span style="color:rgb(74,81,87);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;line-height:16.25px;text-align:justify;background-color:rgb(242,242,220)"><br></span></div><div><span style="text-align:justify;line-height:16.25px;background-color:rgb(242,242,220)"><font color="#4a5157" face="Verdana, Arial, Helvetica, sans-serif"><div style="">C:\llvm-mingw>\ninja\ninja</div><div style="">[1495/2504] Linking CXX static library lib\libLLVMSystemZAsmPrinter.a</div><div style="">FAILED: cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E remove lib\libLLVMSystemZAsmPrinter.a && c:\mingw64\bin\ar.exe cq lib\libLLVMSystemZAsmPrinter.a  lib/Target/SystemZ/InstPrinter/CMakeFiles/LLVMSy</div><div style="">stemZAsmPrinter.dir/SystemZInstPrinter.cpp.obj && c:\mingw64\bin\ranlib.exe lib\libLLVMSystemZAsmPrinter.a && cd ."</div><div style="">c:\mingw64\bin\ranlib.exe: unable to rename 'lib\libLLVMSystemZAsmPrinter.a'; reason: Permission denied</div><div style="">[1495/2504] Linking CXX static library lib\libLLVMSystemZCodeGen.a</div><div style="">ninja: build stopped: subcommand failed.</div><div style=""><br></div><div style="">it doesn't seem to be a deterministic error - restarted ninja just now and it seems to have picked up where it left off. I wonder if that's correlated with the surprising slowness and system impact of mingw (compared to either Microsoft C++ on Windows or GCC on Linux)? I remember it being said that fork is slow on Windows, maybe ninja or GCC make heavy use of fork somehow, or something like that?</div><div style=""><br></div></font></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 25, 2016 at 5:48 AM, barbara via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <div><br>
      You have to use Ninja by specifying:   cmake -G "Ninja"<br>
      <br>
      Since building on Windows is a bit trickier I wrote up some
      documentation. If you find anything unclear please let me know as
      we want this page to stay current and accurate. If anyone wants to
      reference this page or incorporate the text in any other
      documentation, feel free. <br>
      <br>
      <a href="http://www.copperspice.com/documentation-clang.html" target="_blank">http://www.copperspice.com/documentation-clang.html</a><br>
      <br>
      <br>
      Barbara <br>
      <br>
      <br>
    </div>
    </span><div><div class="h5"><blockquote type="cite">
      <div dir="ltr">How did you get LLVM to build with MinGW? I get an
        error message when I try cmake -G "MinGW Makefiles"</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Apr 23, 2016 at 8:31 AM,
          barbara <span dir="ltr"><<a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Russell,<br>
                <br>
                We commented out code so the only lines we have right
                now are the following:<br>
                <br>
                llvm::cl::OptionCategory category("");<br>
                clang::tooling::CommonOptionsParser options(argc, argv,
                category);<br>
                <br>
                Due to other library dependencies in our application we
                can not compile with MSVC. <br>
                <br>
                Barbara<br>
                <br>
                <br>
              </div>
              <div>
                <div>
                  <blockquote type="cite">
                    <div dir="ltr">Okay so it's working for me but not
                      for you, and the two obvious possible candidates
                      for reasons why are that you're using MinGW or
                      that your program does more than mine currently
                      does, and therefore requires more of the
                      functionality of libTooling. To distinguish
                      between those, can you try compiling your program
                      in the way I've been compiling mine, with
                      Microsoft C++ driven by a Windows batch file, and
                      see if that makes any difference?</div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Fri, Apr 22, 2016 at
                        8:05 PM, barbara <span dir="ltr"><<a href="mailto:barbara@copperspice.com" target="_blank"></a><a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <div>Russell,<br>
                              <br>
                              Our initial testing right now is on
                              Windows however we are not using VS but
                              rather MinGW. Our application will need to
                              support libTooling on multiple flavors of
                              Linux and OS X. <br>
                              <br>
                              What we have tested seems to imply there
                              is an ordering issue. I tried the
                              following in our Makefile and there are
                              still unresolved symbols.<br>
                              <br>
                              clang_link=-L$(clang_path)/lib 
                              -llibclang  $(clang_path)/lib/*.a<br>
                              <br>
                              Any ideas or suggestions?<span><font color="#888888"><br>
                                  <br>
                                  Barbara<br>
                                  <br>
                                  <br>
                                </font></span></div>
                            <div>
                              <div>
                                <blockquote type="cite">
                                  <div dir="ltr">I solved the problem of
                                    which libraries by not solving it;
                                    on Windows, my compile command looks
                                    like
                                    <div><br>
                                    </div>
                                    <div>cl /I\llvm\build\include
                                      /I\llvm\build\tools\clang\include
                                      /I\llvm\include
                                      /I\llvm\tools\clang\include /MTd
                                      /Zi compile.cpp
                                      \llvm\build\Debug\lib\*.lib
                                      setargv.obj<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>I.e. just link all the
                                      libraries. Is there an equivalent
                                      of that on Unix?</div>
                                  </div>
                                  <div class="gmail_extra"><br>
                                    <div class="gmail_quote">On Fri, Apr
                                      22, 2016 at 5:15 AM, barbara via
                                      cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank"></a><a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                        <div bgcolor="#FFFFFF" text="#000000">
                                          <div>Manuel,<br>
                                            <br>
                                            Yes, we have looked at this
                                            page and it does talk about
                                            building clang which we have
                                            done successfully.  We have
                                            figured out the required
                                            headers by simply
                                            compiling.  Our issue is
                                            linking.<br>
                                            <br>
                                            Submitting a documentation
                                            patch would be a great idea
                                            and we are happy to do this,
                                            once we know how it works. <br>
                                            <br>
                                            Just to be clear, we are not
                                            putting our code in the
                                            clang source tree. We are
                                            integrating clang parsing as
                                            part of another open source
                                            project.  We need to modify
                                            our build files to link with
                                            libTooling.<br>
                                            <br>
                                            We have not been able to
                                            decipher which libraries are
                                            required.  The following is
                                            part of a makefile we
                                            randomly found on GitHub. Is
                                            it really this hard?  Sadly
                                            this Makefile did not work
                                            for us, we still have link
                                            issues.<br>
                                            <br>
                                            <br>
                                            LIB = -lclangFrontend
                                            -lclangDriver -lclangTooling
                                            \
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> 
                                              -lclangDriver
                                              -lclangTooling
                                              -lclangFrontendTool \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangFrontend



                                              -lclangDriver
                                              -lclangSerialization \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangCodeGen



                                              -lclangParse -lclangSema \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangStaticAnalyzerFrontend




                                              -lclangStaticAnalyzerCheckers

                                              \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangStaticAnalyzerCore



                                              -lclangAnalysis \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangARCMigrate



                                              -lclangRewriteFrontend \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangRewriteCore



                                              -lclangEdit -lclangAST \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangLex



                                              -lclangBasic
                                              -lclangCodeGen -lclangSema
                                              \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangAnalysis



                                              -lclangAST -lclangParse
                                              -lclangLex \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangASTMatchers



                                              \</p>
                                            <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> -lclangBasic



                                              -lLLVMSupport</p>
                                            <br>
                                            <br>
                                            <br>
                                            Barbara<br>
                                            <br>
                                            <br>
                                            <br>
                                            <br>
                                          </div>
                                          <blockquote type="cite">
                                            <div dir="ltr">
                                              <div class="gmail_quote"><span>
                                                  <div dir="ltr">On Thu,
                                                    Apr 21, 2016 at 9:31
                                                    AM barbara <<a href="mailto:barbara@copperspice.com" target="_blank"></a><a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>>
                                                    wrote:<br>
                                                  </div>
                                                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                    <div bgcolor="#FFFFFF" text="#000000">
                                                      <div>Manuel,<br>
                                                        <br>
                                                        Yes, we have
                                                        read all of the
                                                        links on
                                                        clang.llvm for
                                                        LibTooling. 
                                                        Most simply
                                                        mention how to
                                                        use the existing
                                                        tools.  There is
                                                        simply nothing
                                                        we can find
                                                        which shows
                                                        which clang
                                                        libraries are
                                                        required for
                                                        libTooling.<br>
                                                        <br>
                                                        The page you
                                                        listed shows how
                                                        to run
                                                        ClangCheck, not
                                                        how to link an
                                                        third party
                                                        application with
                                                        libTooling. We
                                                        are developing a
                                                        new tool and
                                                        libTooling seems
                                                        to be our best
                                                        shot. <br>
                                                      </div>
                                                    </div>
                                                  </blockquote>
                                                  <div><br>
                                                  </div>
                                                  <div>The page I linked
                                                    shows how to write
                                                    the code. The
                                                    libraries you need
                                                    follow from the
                                                    headers / classes
                                                    you use.</div>
                                                  <div><br>
                                                  </div>
                                                  <div>This:</div>
                                                  <div><a href="http://clang.llvm.org/docs/LibASTMatchersTutorial.html" target="_blank"></a><a href="http://clang.llvm.org/docs/LibASTMatchersTutorial.html" target="_blank">http://clang.llvm.org/docs/LibASTMatchersTutorial.html</a><br>
                                                  </div>
                                                  <div>should also be
                                                    still mostly up to
                                                    date - if it isn't,
                                                    patches are welcome
                                                    :D</div>
                                                  <div><br>
                                                  </div>
                                                  <div>Cheers,</div>
                                                  <div>/Manuel</div>
                                                  <div> </div>
                                                </span>
                                                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                  <div bgcolor="#FFFFFF" text="#000000">
                                                    <div> <br>
                                                      <br>
                                                      Barbara<br>
                                                      <br>
                                                      <br>
                                                      <br>
                                                    </div>
                                                  </div>
                                                  <div bgcolor="#FFFFFF" text="#000000">
                                                    <blockquote type="cite"><span>
                                                        <div dir="ltr">I
                                                          assume you
                                                          have found:
                                                          <div><a href="http://clang.llvm.org/docs/LibTooling.html" target="_blank"></a><a href="http://clang.llvm.org/docs/LibTooling.html" target="_blank">http://clang.llvm.org/docs/LibTooling.html</a><br>
                                                          </div>
                                                          <div>(which is
                                                          the first hit
                                                          for me when
                                                          searching for
                                                          "libtooling
                                                          clang")</div>
                                                        </div>
                                                        <br>
                                                      </span>
                                                      <div class="gmail_quote"><span>
                                                          <div dir="ltr">On

                                                          Wed, Apr 20,
                                                          2016 at 9:56
                                                          PM barbara via
                                                          cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank"></a><a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>>




                                                          wrote:<br>
                                                          </div>
                                                        </span>
                                                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
                                                          <div bgcolor="#FFFFFF" text="#000000">
                                                          <font face="Helvetica,
                                                          Arial,
                                                          sans-serif">We
                                                          have found AST
                                                          limitations
                                                          with libClang
                                                          and understand
                                                          few developers
                                                          are using this
                                                          approach for
                                                          parsing C++. 
                                                          We have been
                                                          advised to
                                                          switch to
                                                          using
                                                          libTooling,
                                                          which now
                                                          makes sense. 
                                                          <br>
                                                          <br>
                                                          We have found
                                                          limited
                                                          documentation
                                                          and are
                                                          working our
                                                          why though
                                                          what it take
                                                          to set up a
                                                          project which
                                                          uses
                                                          libTooling.
                                                          The only
                                                          tutorials we
                                                          have found are
                                                          from several
                                                          years ago. If
                                                          newer ones
                                                          exist it would
                                                          be great to
                                                          know about
                                                          them.
                                                          Searching for
                                                          "libTooling"
                                                          yields too
                                                          many hits on
                                                          "libtool",
                                                          which is
                                                          obviously not
                                                          what we are
                                                          looking for. 
                                                          <br>
                                                          <br>
                                                          I believe we
                                                          have figured
                                                          out the
                                                          appropriate
                                                          include files.
                                                          Our current
                                                          obstacle is
                                                          figuring out
                                                          what clang
                                                          libraries we
                                                          need. This
                                                          seems to be
                                                          order
                                                          dependent, but
                                                          I could be
                                                          incorrect. We
                                                          have link
                                                          errors and
                                                          trying to look
                                                          up undefined
                                                          symbols in
                                                          nearly
                                                          impossible.<br>
                                                          <br>
                                                          We look
                                                          forward to
                                                          someone who
                                                          can point us
                                                          in the right
                                                          direction as
                                                          it seems we
                                                          are missing a
                                                          few basics. <br>
                                                          <br>
                                                          Thanks, <br>
                                                          <br>
                                                          Barbara<br>
                                                          Co-Founder of
                                                          DoxyPress<br>
                                                          </font><br>
                                                          </div>
                                                          </span><span>
_______________________________________________<br>
                                                          cfe-dev
                                                          mailing list<br>
                                                          <a href="mailto:cfe-dev@lists.llvm.org" target="_blank"></a><a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
                                                          <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank"></a><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
                                                          </span></blockquote>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                  <div bgcolor="#FFFFFF" text="#000000"><br>
                                                  </div>
                                                </blockquote>
                                              </div>
                                            </div>
                                          </blockquote>
                                          <br>
                                        </div>
                                        <br>
                                        <br>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  <br>
<table style="border-top:1px solid #aaabb6">
        <tbody><tr>
        <td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange-v1.png"></a></td>
                <td style="width:470px;padding-top:15px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link" style="color:#4453ea" target="_blank">www.avast.com</a>
                </td>
        </tr>
</tbody></table></div></div></div>

<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>