Paul C. Anagnostopoulos via llvm-dev
2020-Jul-31 13:32 UTC
[llvm-dev] Which compiler collection on Windows?
Now that I can build LLVM on Windows, I tried doing it. -------------------------- ... some good stuff ... C:/LLVM/llvm-project/llvm/lib/Support/Chrono.cpp:35:17: error: '::localtime_s' has not been declared; did you mean 'localtime'? 35 | int Error = ::localtime_s(&Storage, &OurTime); | ^~~~~~~~~~~ | localtime (The error line is preceded by #if defined(_WIN32).) ---------------------------- A little research shows that localtime_s is a Microsoft extension and is not included with MinGW. From this I cleverly infer that I should have installed a different compiler collection. Can anyone give me a hint?
Stefanos Baziotis via llvm-dev
2020-Jul-31 13:40 UTC
[llvm-dev] Which compiler collection on Windows?
Hi, I think the best bet is going with visual studio (which will give you the `cl` command line invocation of the compiler if you want to). - Stefanos Στις Παρ, 31 Ιουλ 2020 στις 4:37 μ.μ., ο/η Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> έγραψε:> Now that I can build LLVM on Windows, I tried doing it. > > -------------------------- > ... some good stuff ... > C:/LLVM/llvm-project/llvm/lib/Support/Chrono.cpp:35:17: error: > '::localtime_s' has not been declared; did you mean 'localtime'? > 35 | int Error = ::localtime_s(&Storage, &OurTime); > | ^~~~~~~~~~~ > | localtime > > (The error line is preceded by #if defined(_WIN32).) > ---------------------------- > > A little research shows that localtime_s is a Microsoft extension and is > not included with MinGW. From this I cleverly infer that I should have > installed a different compiler collection. Can anyone give me a hint? > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200731/77e33ff1/attachment.html>
Martin Storsjö via llvm-dev
2020-Aug-03 10:33 UTC
[llvm-dev] Which compiler collection on Windows?
On Fri, 31 Jul 2020, Paul C. Anagnostopoulos via llvm-dev wrote:> Now that I can build LLVM on Windows, I tried doing it. > > -------------------------- > ... some good stuff ... > C:/LLVM/llvm-project/llvm/lib/Support/Chrono.cpp:35:17: error: '::localtime_s' has not been declared; did you mean 'localtime'? > 35 | int Error = ::localtime_s(&Storage, &OurTime); > | ^~~~~~~~~~~ > | localtime > > (The error line is preceded by #if defined(_WIN32).) > ---------------------------- > > A little research shows that localtime_s is a Microsoft extension and is > not included with MinGW. From this I cleverly infer that I should have > installed a different compiler collection. Can anyone give me a hint?The localtime_s function should be available in mingw-w64 based toolchains. Toolchains from mingw.org (the original mingw project, that mingw-w64 is a fork of) probably lacks this API though. // Martin
Paul C. Anagnostopoulos via llvm-dev
2020-Aug-03 11:01 UTC
[llvm-dev] Which compiler collection on Windows?
Thank you for this information. I switched to Visual Studio a few days ago and did a successful build. At 8/3/2020 06:33 AM, Martin Storsjö wrote:>On Fri, 31 Jul 2020, Paul C. Anagnostopoulos via llvm-dev wrote: > >>Now that I can build LLVM on Windows, I tried doing it. >>-------------------------- >>... some good stuff ... >>C:/LLVM/llvm-project/llvm/lib/Support/Chrono.cpp:35:17: error: '::localtime_s' has not been declared; did you mean 'localtime'? >> 35 | int Error = ::localtime_s(&Storage, &OurTime); >> | ^~~~~~~~~~~ >> | localtime >> >>(The error line is preceded by #if defined(_WIN32).) >>---------------------------- >> >>A little research shows that localtime_s is a Microsoft extension and is not included with MinGW. From this I cleverly infer that I should have installed a different compiler collection. Can anyone give me a hint? > >The localtime_s function should be available in mingw-w64 based toolchains. Toolchains from mingw.org (the original mingw project, that mingw-w64 is a fork of) probably lacks this API though. > >// Martin