[LLVMdev] Self-compiling clang on Windows

Russell Wallace russell.wallace at gmail.com
Wed Jun 10 12:43:45 PDT 2015


I'm trying to get clang 3.6.1 to compile itself on Windows, using this
command line:

msbuild /p:Configuration=Release /p:CLToolExe=clang-cl.exe
/p:CLToolPath=c:\llvm\build\Release\bin\ /p:TrackFileAccess=false
/p:Platform="x64" /fileLogger ALL_BUILD.vcxproj

It barfed on an occurrence of __try but that was only in a test file so I
commented it out and retried. Now it's getting an error I can't quite make
sense of:

  In file included from C:\llvm2\lib\Support\TimeValue.cpp:55:
C:\llvm2\lib\Support/Windows/TimeValue.inc(48,7): warning : unused variable
'Error' [-Wunused-variable] [C:\llvm2\build\lib\Support\LLVMSupport.vcxproj]
CL : int error =: :_localtime64_s(&Storage, &OurTime);
[C:\llvm2\build\lib\Support\LLVMSupport.vcxproj]
        ^
  1 warning generated.
  The command exited with code -1.
Done executing task "CL" -- FAILED.
Done building target "ClCompile" in project "LLVMSupport.vcxproj" -- FAILED.
Done Building Project "C:\llvm2\build\lib\Support\LLVMSupport.vcxproj"
(default targets) -- FAILED.

That says 'warning generated' but it looks like a syntax error not an
unused variable warning, and it is the one place in the build where the
command exited with code -1. And the final verdict on the unsuccessful
build:

"C:\llvm2\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\llvm2\build\utils\FileCheck\FileCheck.vcxproj" (default target) (2) ->
"C:\llvm2\build\lib\Support\LLVMSupport.vcxproj" (default target) (3) ->
(ClCompile target) ->
  CL : int error =: :_localtime64_s(&Storage, &OurTime);
[C:\llvm2\build\lib\Support\LLVMSupport.vcxproj]

    135 Warning(s)
    1 Error(s)

So it seems to be saying that was the one error that prevented the build
from proceeding. So I took a look in that file, and here's the offending
line 48:

  int Error = ::_localtime64_s(&Storage, &OurTime);

... Contrary to the report, no syntax error, no space between the :'s. I
looked at a hex dump of the file and it is as it seems here, still no
error. I'd be wondering about cosmic rays flipping bits in RAM but I tried
the build twice and got the mysterious error each time.

Anyone have any idea what's going on? Am I just missing something terribly
obvious?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150610/00fda8e6/attachment.html>


More information about the llvm-dev mailing list