[runtime] Fixed LLVM Windows cross-compilation.
authorJoão Matos <joao@tritao.eu>
Mon, 4 May 2015 13:51:14 +0000 (14:51 +0100)
committerJoão Matos <joao@tritao.eu>
Mon, 4 May 2015 13:58:49 +0000 (14:58 +0100)
This configuration was broken with https://github.com/mono/mono/commit/4a20119029a0ba36866be8575909085c3742e85b.

Manifested as the following error:
```configure: error: LLVM executable /Users/builder/data/lanes/1196/47be2825/source/monodroid/builds/cross/windows-llvm/usr/bin/llvm-config not found.```

configure.ac

index 23cfdd2c34c1c2ee0cc8f23952013e7bdc587117..319a2c013ee07ed341e5d25cfab895a63f27b04f 100644 (file)
@@ -2658,7 +2658,7 @@ AC_ARG_WITH(llvm, [  --with-llvm=<llvm prefix>    Enable the LLVM back-end], ena
 if test "x$enable_llvm" = "xyes"; then
    if test "x$with_llvm" != "x"; then
          LLVM_CONFIG=$with_llvm/bin/llvm-config
-         if test x$target_win32 = xyes; then
+         if test x$host_win32 = xyes; then
                LLVM_CONFIG=$LLVM_CONFIG.exe
          fi
          if test ! -x $LLVM_CONFIG; then
@@ -2678,7 +2678,7 @@ if test "x$enable_llvm" = "xyes"; then
                ;;
    esac
 
-   if test "x$target_win32" = "xno"; then
+   if test "x$host_win32" = "xno"; 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'`