<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTOURBUG - llvmpipe Windows scons build can't detect Visual Studio 2017 toolchain"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100202#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTOURBUG - llvmpipe Windows scons build can't detect Visual Studio 2017 toolchain"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100202">bug 100202</a>
              from <span class="vcard"><a class="email" href="mailto:anonymous@dodgeit.com" title="Anonymous Helper <anonymous@dodgeit.com>"> <span class="fn">Anonymous Helper</span></a>
</span></b>
        <pre>Workaround:
Open Visual Studio 2017 installer. Opt-in for Visual Studio 2015 Update 3
toolset
in Desktop Development with C/C++ section.
Because LLVM 4.0 is not supported per <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llvmpipe Windows scons build with Visual Studio 2015 toolchain and LLVM 4.0 fails"
   href="show_bug.cgi?id=100201">bug 100201</a> you have to patch LLVM 3.9.1
source code with this 
<a href="https://www.diffchecker.com/t58yZ2JE">https://www.diffchecker.com/t58yZ2JE</a> on lib\DebugInfo\PDB\DIA\DIASession.cpp
line 61.
For now you can use either the normal VS2017 Native Tools and VS2015 Native
Tools, but VS2017 toolset would stop working if <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llvmpipe Windows scons build with Visual Studio 2015 toolchain and LLVM 4.0 fails"
   href="show_bug.cgi?id=100201">bug 100201</a> gets fixed before
this bug.
This is because of the following confusion with Scons:
- MSVC 2017 toolset has built-in xtime definition;
- MSVC 2015 toolset doesn't;
- LLVM 4.0 makes use of xtime;
- LLVM 3.9.1 doesn't;
- Scons, while it can use MSVC 2017 toolset if MSVC 2015 toolset is installed,
it doesn't support it properly, it is unable to detect certain headers, mainly
brand new ones like xtimec.h where xtime is defined. This leads to a no escape
situation where you can only decide how you fail.

- If you remove xtime definition from Mesa codbase, you quickly get xtime
undefined coming from Scons;
- If you leave this unchanged, MSVC compiler encounters an xtime redifintion
close to the end of the build like here:
<a href="https://bugs.freedesktop.org/attachment.cgi?id=130219">https://bugs.freedesktop.org/attachment.cgi?id=130219</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>