Set llc and opt commands on all platforms
authorAustin Seipp <austin@well-typed.com>
Mon, 1 Sep 2014 20:14:07 +0000 (15:14 -0500)
committerAustin Seipp <austin@well-typed.com>
Mon, 1 Sep 2014 20:14:07 +0000 (15:14 -0500)
Summary:
LLVM llc and opt commands should be set on all platforms, including
Windows. If they're not, GHC tries to execute an unnamed executable,
resulting in error messages such as:

    Error (figuring out LLVM version): : runInteractiveProcess: invalid argument (Invalid argument)
    <no location info>:
        Warning: Couldn't figure out LLVM version!
                 Make sure you have installed LLVM

This regression was introduced in e6bfc596.

Test Plan: Build GHC and test if --info shows sensible values of "LLVM llc command" and "LLVM opt command"

Reviewers: austin, #ghc

Reviewed By: austin, #ghc

Subscribers: austin

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D190

GHC Trac Issues: #7143

aclocal.m4

index bdc6c5d..09300f1 100644 (file)
@@ -473,18 +473,18 @@ AC_DEFUN([FP_SETTINGS],
         SettingsWindresCommand="/bin/false"
         SettingsLibtoolCommand="libtool"
         SettingsTouchCommand='touch'
-        if test -z "$LlcCmd"
-        then
-          SettingsLlcCommand="llc"
-        else
-          SettingsLlcCommand="$LlcCmd"
-        fi
-        if test -z "$OptCmd"
-        then
-          SettingsOptCommand="opt"
-        else
-          SettingsOptCommand="$OptCmd"
-        fi
+    fi
+    if test -z "$LlcCmd"
+    then
+      SettingsLlcCommand="llc"
+    else
+      SettingsLlcCommand="$LlcCmd"
+    fi
+    if test -z "$OptCmd"
+    then
+      SettingsOptCommand="opt"
+    else
+      SettingsOptCommand="$OptCmd"
     fi
     SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
     SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"