<div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>I am building clang from the latest svn.<br></div>I've successfully managed to build clang, but I cannot compile a simple program.<br></div>So I built clang with mingw (x86) based on gcc 4.8.0 and copied the executables to the mingw bin directory.<br>
<br></div>This is the command line I use to build a simple program:<br><br>clang++ -isystem"D:\Dropbox\Stuff\Projects\llvm\build\lib\clang\3.4\include" -isystem"C:\test\mingw32-4.8.0-x86\i686-pc-mingw32\include" -isystem"C:\test\mingw32-4.8.0-x86\include\c++\4.8.0" -isystem"C:\test\mingw32-4.8.0-x86\include\c++\4.8.0\i686-pc-mingw32" -isystem"C:\Program Files\Gecode\include" -L"D:\Dropbox\Stuff\Projects\gecode-4.0.0\build_clang" -Weverything -std=c++11 -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-global-constructors Temp.cpp<br>
</div><div><br>When I compile the source, I get this:<br><br>clang version 3.4 (182718)<br>Target: i686-pc-mingw32<br>Thread model: posix<br> "C:/test/mingw32-4.8.0-x86/bin/clang++.exe" -cc1 -triple i686-pc-mingw32 -S -disable-free -disable-llvm-verifier -main-file-name Temp.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-cpu pentium4 -v -resource-dir "C:/test/mingw32-4.8.0-x86/bin\\..\\lib\\clang\\3.4" -isystem "D:\\Dropbox\\Stuff\\Projects\\llvm\\build\\lib\\clang\\3.4\\include" -isystem "C:\\test\\mingw32-4.8.0-x86\\i686-pc-mingw32\\include" -isystem "C:\\test\\mingw32-4.8.0-x86\\include\\c++\\4.8.0" -isystem "C:\\test\\mingw32-4.8.0-x86\\include\\c++\\4.8.0\\i686-pc-mingw32" -isystem "C:\\Program Files\\Gecode\\include" -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-global-constructors -std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -backend-option -vectorize-loops -o C:/Users/Mana/AppData/Local/Temp/Temp-155285.s -x c++ Temp.cpp<br>
clang -cc1 version 3.4 based upon LLVM 3.4svn default target i686-pc-mingw32<br><br> "C:/test/mingw32-4.8.0-x86/bin/i686-pc-mingw32-g++.exe" -isystem "D:\\Dropbox\\Stuff\\Projects\\llvm\\build\\lib\\clang\\3.4\\include" -isystem "C:\\test\\mingw32-4.8.0-x86\\i686-pc-mingw32\\include" -isystem "C:\\test\\mingw32-4.8.0-x86\\include\\c++\\4.8.0" -isystem "C:\\test\\mingw32-4.8.0-x86\\include\\c++\\4.8.0\\i686-pc-mingw32" -isystem "C:\\Program Files\\Gecode\\include" "-LD:\\Dropbox\\Stuff\\Projects\\gecode-4.0.0\\build_clang" -Weverything -std=c++11 -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-global-constructors -v -c -m32 -o C:/Users/Mana/AppData/Local/Temp/Temp-155286.o -x assembler C:/Users/Mana/AppData/Local/Temp/Temp-155285.s<br>
Built by Equation Solution <<a href="http://www.Equation.com">http://www.Equation.com</a>>.<br>Using built-in specs.<br>COLLECT_GCC=C:/test/mingw32-4.8.0-x86/bin/i686-pc-mingw32-g++.exe<br>i686-pc-mingw32-g++.exe: error: unrecognized command line option '-Weverything'<br>
Target: i686-pc-mingw32<br>Configured with: ../gcc-4.8.0-mingw/configure --host=i686-pc-mingw32 --build=x86_64-unknown-linux-gnu --target=i686-pc-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.8.0 --with-gcc --with-gnu-as --with-gnu-ld --with-cloog=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/cloog --with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr --with-mpc=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpc --with-isl=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/isl --enable-cloog-backend=isl --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.8.0 --disable-shared --disable-nls --disable-tls --disable-win32-registry --enable-build-with-cxx --enable-libquadmath-support --enable-libquadmath --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=win32 --enable-lto --enable-static --enable-shared=lto-plugin --enable-plugins --enable-ld=yes<br>
Thread model: win32<br>gcc version 4.8.0 (GCC) <br>clang++.exe: error: assembler (via gcc) command failed with exit code 1 (use -v to see invocation)<br><br></div>What is the problem here? Is clang incorrectly configured or is this version of g++ just incompatible with clang++?<br>
<br></div>To make clang, I simply use:<br><br>cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ..<br>start /low /affinity 7f /b ninja<br><br></div>(Using mingw based on gcc 4.8.0.)<br></div>