<div dir="ltr"><div>+llvm-commits</div><div><br></div>Hi Peter,<div><br></div><div>I think this patch is fine. Feel free to go ahead and commit it.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 12, 2015 at 9:07 PM, Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.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>I can confirm that with the following
      change the generated file has the necessary variable is set, and
      the build completes successfully.<br>
      <br>
      Index: cmake/Modules/AddCompilerRT.cmake<br>
===================================================================<br>
      --- cmake/Modules/AddCompilerRT.cmake    (revision 234704)<br>
      +++ cmake/Modules/AddCompilerRT.cmake    (working copy)<br>
      @@ -248,6 +248,7 @@<br>
                      -DCMAKE_CXX_FLAGS=${LIBCXX_CFLAGS}<br>
                      -DCMAKE_BUILD_TYPE=Release<br>
                      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR><br>
      +           -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}<br>
           LOG_BUILD 1<br>
           LOG_CONFIGURE 1<br>
           LOG_INSTALL 1<div><div class="h5"><br>
      <br>
      On 11/04/15 16:56, Alexey Samsonov wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Hi Peter,
        <div><br>
        </div>
        <div>Sorry for the late response. Unfortunately, I can't
          experiment with it myself at the moment, but you can</div>
        <div>try passing correct -DCMAKE_MAKE_PROGRAM flag to
          ExternalProject_Add invocation here:</div>
        <div>  <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?view=markup" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?view=markup</a></div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Apr 6, 2015 at 11:34 AM, Reid
          Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">I think Alexey might know who wrote the
              libc++ tsan and msan build scripts. I suspect you don't
              need those, and that your build would succeed if you built
              libcxx instead of 'all'.
              <div><br>
              </div>
              <div>Clang (and clang tools) should work with all the
                major versions of libstdc++. I suspect fixing this will
                be more fruitful than trying to port your codebase to a
                new STL implementation. I think you sent email about
                those problems, let me try to go find those threads and
                reply there.</div>
            </div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Sun, Apr 5, 2015 at 2:42
                    PM, Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
                      Since clang tools currently choke when using the
                      gcc 4.9.2 libstdc++ headers (and 4.8.3, and 4.8.2,
                      and testing against older versions is seriously
                      inconvenient), I decided to try libcxx to work
                      around it. I checked out the source as described
                      in [1], but that caused the llvm build to fail
                      with the following error:<br>
                      <br>
                      [9/24] Performing configure step for 'libcxx_tsan'<br>
                      FAILED: cd /home/peter/Programming/llvm/ninja/projects/compiler-rt/lib/tsan/libcxx_tsan/src/libcxx_tsan-build
                      && /usr/bin/cmake -P
                      /home/peter/Programming/llvm/ninja/projects/compiler-rt/lib/tsan/libcxx_tsan/src/libcxx_tsan-stamp/libcxx_tsan-configure.cmake
                      && /usr/bin/cmake -E touch
                      /home/peter/Programming/llvm/ninja/projects/compiler-rt/lib/tsan/libcxx_tsan/src/libcxx_tsan-stamp/libcxx_tsan-configure<br>
                      CMake Error at /home/peter/Programming/llvm/ninja/projects/compiler-rt/lib/tsan/libcxx_tsan/src/libcxx_tsan-stamp/libcxx_tsan-configure.cmake:16
                      (message):<br>
                        Command failed: 1<br>
                      <br>
                         '/usr/bin/cmake' '-DCMAKE_C_COMPILER=/home/peter/Programming/llvm/ninja/./bin/clang'
                      '-DCMAKE_CXX_COMPILER=/home/peter/Programming/llvm/ninja/./bin/clang'
                      '-DCMAKE_C_FLAGS= -fsanitize=thread'
                      '-DCMAKE_CXX_FLAGS= -fsanitize=thread'
                      '-DCMAKE_BUILD_TYPE=Release'
                      '-DCMAKE_INSTALL_PREFIX:PATH=/home/peter/Programming/llvm/ninja/projects/compiler-rt/lib/tsan/libcxx_tsan'
                      '-GNinja' '/home/peter/Programming/llvm/llvm/projects/libcxx'<br>
                      <br>
                        See also<br>
                      <br>
                      /home/peter/Programming/llvm/ninja/projects/compiler-rt/lib/tsan/libcxx_tsan/src/libcxx_tsan-stamp/libcxx_tsan-configure-*.log<br>
                      <br>
                      Close inspection reveals that it tries to run
                      cmake passing -GNinja (the same as the main build)
                      but doesn't supply -DCMAKE_MAKE_PROGRAM. Editing
                      the file [2] to inject the missing parameter lets
                      the build succeed, but as that file is generated,
                      this edit needs to be repeated sometimes when I
                      update svn, and I'm not sure where it is generated
                      from for a more permanent fix.<br>
                      <br>
                      [1] <a href="http://libcxx.llvm.org/" target="_blank">http://libcxx.llvm.org/</a><br>
                      [2] $BUILD/projects/compiler-rt/lib/tsan/libcxx_tsan/src/libcxx_tsan-stamp/libcxx_tsan-configure.cmake<br>
                      <br>
                      _______________________________________________<br>
                      cfe-dev mailing list<br>
                      <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
                      <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div>
          <div dir="ltr">Alexey Samsonov<br>
            <a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>