X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=configure.ac;h=9099f702b074ce5c1c9e00c8028866b0edc7518c;hb=da0ccf07f0a7ee8bfde612bdc551c06062289f73;hp=3725b6b41af10e5d1d7d3828928c050e4da4fec2;hpb=67ca203ea1692caf70747698fe62ea7e30488e72;p=mono.git diff --git a/configure.ac b/configure.ac index 3725b6b41af..9099f702b07 100644 --- a/configure.ac +++ b/configure.ac @@ -2599,19 +2599,26 @@ if test "x$enable_llvm" = "xyes"; then # The output of --cflags seems to include optimizations flags too LLVM_CFLAGS=`$LLVM_CONFIG --cflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'` + LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'` # LLVM is compiled with -fno-rtti, so we need this too, since our classes inherit # from LLVM classes. - LLVM_CXXFLAGS="`$LLVM_CONFIG --cxxflags` -fno-rtti" + LLVM_CXXFLAGS="$LLVM_CXXFLAGS -fno-rtti -fexceptions" LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` # This might include empty lines LLVM_SYSTEM_LIBS=`$LLVM_CONFIG --system-libs 2>/dev/null | grep -- -` if test "x$host" != "x$target"; then # No need for jit libs - LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter` + LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter` else - LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit mcjit $llvm_codegen` + LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter jit mcjit $llvm_codegen` + fi + LLVM_LIBS="$LLVM_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS" + # The c++ standard library used by llvm doesn't show up in $LLVM_SYSTEM_LIBS so add it manually + if echo $LLVM_CXXFLAGS | grep -q -stdlib=libc++; then + LLVM_LIBS="$LLVM_LIBS -lc++" + else + LLVM_LIBS="$LLVM_LIBS -lstdc++" fi - LLVM_LIBS="$LLVM_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS -lstdc++" expected_llvm_version="3.4svn-mono-mono/e656cac" @@ -2632,7 +2639,7 @@ if test "x$enable_llvm" = "xyes"; then else LLVM_CFLAGS="-I$with_llvm/include -DNDEBUG -D__NO_CTYPE_INLINE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" - LLVM_CXXFLAGS="$LLVM_CFLAGS -std=gnu++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Woverloaded-virtual -Wcast-qual" + LLVM_CXXFLAGS="$LLVM_CFLAGS -std=gnu++11 -fvisibility-inlines-hidden -fno-rtti -Woverloaded-virtual -Wcast-qual" LLVM_LDFLAGS="-L$with_llvm/lib" LLVM_SYSTEM_LIBS="-lshell32 -lpsapi -limagehlp -ldbghelp -lm" LLVM_LIBS="-lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter \ @@ -2640,6 +2647,7 @@ if test "x$enable_llvm" = "xyes"; then -lLLVMARMAsmPrinter -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler \ -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc \ -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT \ + -lLLVMAnalysis -lLLVMTarget \ -lLLVMIRReader -lLLVMAsmParser -lLLVMLineEditor -lLLVMMCAnalysis -lLLVMInstrumentation \ -lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils \ -lLLVMipa -lLLVMAnalysis -lLLVMProfileData -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld \