Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
LLVM/Clang compiler for MinGW
MortenMacFly:
Hi all,
I am looking for a LLVM/Clang compiler suite that works under Win32.
These I tried, but they all fail with crashes, missing libraries or alike:
1.) http://llvm.org/releases/download.html
-> http://llvm.org/releases/3.2/clang+llvm-3.2-x86-mingw32-EXPERIMENTAL.tar.gz
2.) http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/clang-3.2-release/i686-w64-mingw32-clang-3.2-release-win32_rubenvb.7z
...with:
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-dw2-4.6-release/i686-w64-mingw32-gcc-dw2-4.6.3-2-release-win32_rubenvb.7z
...or:
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-dw2-4.7-release/i686-w64-mingw32-gcc-dw2-4.7.2-release-win32_rubenvb.7z
...or:
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.7-release/i686-w64-mingw32-gcc-4.7.2-release-win32_rubenvb.7z
What combination does work for you reliable on Windows? I would like to test the ability of C::B to drive this compiler, btw...
golgepapaz:
You can build it yourself. configure or cmake based builds works out of the box..
I do have two modifications to the source code, one pertaining to clang unable to find
mingw header files (4.7.2, 4.7.3 etc) and one about calling convention if you happen upon
some problems..
Interestingly I'd come to report nullptr causing problems with clang because definition in
prep.h does not consider clang.
--- Code: ---#if !(__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined __GXX_EXPERIMENTAL_CXX0X__)
// it is a const object...
const class nullptr_t
{
public:
// constructor
nullptr_t() {}
// convertible to any type of null non-member pointer...
template<typename T> operator T* () const{ return (T*)0; }
// or any type of null member pointer...
template<typename C, typename T> operator T C::* () const { return (T C::*)0; }
// support operator overloading (== and !=)
template<typename T> bool equals(T const& rhs) const { return rhs == 0; }
private:
// can't take address of nullptr
void operator&() const;
// can't copyable
nullptr_t(const nullptr_t&);
const nullptr_t& operator=(const nullptr_t&);
} nullptr_;
#define nullptr nullptr_
#endif
--- End code ---
it needs also something like
#if !(__has_feature(cxx_nullptr))
Clang does not use something like GXX_EXPERIMENTAL_CXX0X or version numbers but instead opts for
__has_feature macro to query if certain language features are enabled.
http://clang.llvm.org/docs/LanguageExtensions.html#checking_upcoming_features
vwdvaan:
--- Quote from: MortenMacFly on January 22, 2013, 07:30:14 am ---Hi all,
I am looking for a LLVM/Clang compiler suite that works under Win32.
These I tried, but they all fail with crashes, missing libraries or alike:
1.) http://llvm.org/releases/download.html
-> http://llvm.org/releases/3.2/clang+llvm-3.2-x86-mingw32-EXPERIMENTAL.tar.gz
2.) http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/clang-3.2-release/i686-w64-mingw32-clang-3.2-release-win32_rubenvb.7z
...with:
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-dw2-4.6-release/i686-w64-mingw32-gcc-dw2-4.6.3-2-release-win32_rubenvb.7z
...or:
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-dw2-4.7-release/i686-w64-mingw32-gcc-dw2-4.7.2-release-win32_rubenvb.7z
...or:
-> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.7-release/i686-w64-mingw32-gcc-4.7.2-release-win32_rubenvb.7z
What combination does work for you reliable on Windows? I would like to test the ability of C::B to drive this compiler, btw...
--- End quote ---
i686-w64-mingw32-clang-3.1-release-win32_rubenvb.7z with i686-w64-mingw32-gcc-dw2-4.6.3-2-release-win32_rubenvb.7z
Create a dir LLVM and copy in that dir.
eranif:
--- Quote ---I am looking for a LLVM/Clang compiler suite that works under Win32.
These I tried, but they all fail with crashes, missing libraries or alike:
--- End quote ---
I have it self compiled on my machine with TDM-GCC-4.7.1. i.e. in order for it to work you also need to install TDM-GCC-4.7.1
HOWEVER, (and this is a big _HOWEVER_): gdb (Windows only) can not debug binaries created with clang under Windows
I opened a bug for this here:
http://llvm.org/bugs/show_bug.cgi?id=13636
There is patch for this bug which I am not sure it was applied...( I will test with latest trunk tonight):
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/056009.html
Drop me a message if you want me to upload my compiled version
Eran
xunxun:
--- Quote from: eranif on May 01, 2013, 12:57:59 pm ---
There is patch for this bug which I am not sure it was applied...( I will test with latest trunk tonight):
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/056009.html
--- End quote ---
Is the patch effective for debugging after your test?
Navigation
[0] Message Index
[#] Next page
Go to full version