[cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-11 Thread Maarten Verhage via cfe-users
Dear LLVM/clang people,

I’m new to LLVM. I used TDM-GCC toolchain with gcc version 5.1.0 before but 
I want to move on getting LLVM and Clang to work on my system: Windows 7 
64bit.

I would like to go for a MinGW64 toolchain to build the newest version of 
LLVM and clang.

I downloaded MinGW-W64 GCC-8.1.0 from here:
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/

There I selected the x86_64-posix-seh version believing that would be the 
best one. I got llvm and clang plus the llvm libc++ standard library as 
suggested on the getting started webpage.

I put the mingw-w64 bin folder in my PATH.
gcc -dumpversion
shown 8.1.0

In the llvm build folder I did:
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
that completed succesfully

mingw32-make -f Makefile

It builds to 57%, then a bunch of errors:
1)
C:\dev\llvm\projects\libcxx\src\support\win32\thread_win32.cpp:156:8: error: 
'InitOnceExecuteOnce' was not declared in this scope
2)
C:\dev\llvm\projects\libcxx\src\support\win32\thread_win32.cpp:163:6: error: 
redefinition of 'bool 
std::__1::__libcpp_thread_id_equal(std::__1::__libcpp_thread_id, 
std::__1::__libcpp_thread_id)'
3) And a couple of more errors all in thread_win32.cpp.

So I think it would have been better to select the Mingw-w64 
x86_64-win32-seh or even x86_64-win32-sjlj version instead?

Is a recent Mingw-w64 toolchain version like 8.1.0 a good one to build 
llvm/clang? Or would an older one be more stable?

Thanks anyway for any suggestions.
Best regards,
Maarten Verhage 

___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-13 Thread Maarten Verhage via cfe-users
Hi all,

You know, as the compile errors all were in thread_win32.cpp I was 
suspicious how the build would do with x86_64-win32-seh but that failed 
because Mingw-w64 did not have the header file mutex.

As I have the llvm libcxx library with this mutex header file (among other 
stuff) would there be a way to have Mingw-w64 use this library during the 
build of llvm and clang or wouldn't that work?

Also is there any documentation for specifics in building llvm with 
Mingw-w64?

Regards, Maarten 

___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-24 Thread Maarten Verhage via cfe-users

- Original Message - 
From: "Maarten Verhage" 
To: 
Sent: Tuesday, November 13, 2018 13:47
Subject: Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows


> Hi all,
>
> You know, as the compile errors all were in thread_win32.cpp I was 
> suspicious how the build would do with x86_64-win32-seh but that failed 
> because Mingw-w64 did not have the header file mutex.
>
> As I have the llvm libcxx library with this mutex header file (among other 
> stuff) would there be a way to have Mingw-w64 use this library during the 
> build of llvm and clang or wouldn't that work?
>
> Also is there any documentation for specifics in building llvm with 
> Mingw-w64?
>
> Regards, Maarten

Hi all,

I've not much experience with building C++ standard libraries like libcxx 
and libcxxabi. But:

As the build of llvm and clang fails on my Windows 7 with Mingw-w64 
toolchain. It fails in the standard C++ library part and not in pure C++ 
code. So I was thinking to first build the provided LLVM libcxx (and 
libcxxabi) libraries into my Mingw-w64 toolchain. Replacing the standard C++ 
library of Mingw-w64. And then go for a build of LLVM with clang itself.

Could that work?

If so believe so, could someone provide advise how to get this done? like: 
flags to cmake, folder structure and correct PATH settings.

Best regards,
Maarten Verhage 

___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users