Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
e6bfc596
Commit
e6bfc596
authored
Jan 10, 2012
by
dterei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable llvm tool paths to be set with ./configure
Patch from Karel Gardas!
parent
4a0eb925
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
3 deletions
+63
-3
aclocal.m4
aclocal.m4
+43
-0
compiler/main/SysTools.lhs
compiler/main/SysTools.lhs
+2
-2
configure.ac
configure.ac
+12
-0
mk/config.mk.in
mk/config.mk.in
+3
-0
settings.in
settings.in
+3
-1
No files found.
aclocal.m4
View file @
e6bfc596
...
...
@@ -370,6 +370,18 @@ AC_DEFUN([FP_SETTINGS],
SettingsDllWrapCommand="/bin/false"
SettingsWindresCommand="/bin/false"
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
AC_SUBST(SettingsCCompilerCommand)
AC_SUBST(SettingsCCompilerFlags)
...
...
@@ -377,6 +389,8 @@ AC_DEFUN([FP_SETTINGS],
AC_SUBST(SettingsDllWrapCommand)
AC_SUBST(SettingsWindresCommand)
AC_SUBST(SettingsTouchCommand)
AC_SUBST(SettingsLlcCommand)
AC_SUBST(SettingsOptCommand)
])
...
...
@@ -538,6 +552,35 @@ AC_ARG_WITH($2,
]) # FP_ARG_WITH_PATH_GNU_PROG
# FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
# --------------------
# XXX
#
# $1 = the variable to set
# $2 = the command to look for
#
AC_DEFUN([FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL],
[
AC_ARG_WITH($2,
[AC_HELP_STRING([--with-$2=ARG],
[Use ARG as the path to $2 [default=autodetect]])],
[
if test "$HostOS" = "mingw32"
then
AC_MSG_WARN([Request to use $withval will be ignored])
else
$1=$withval
fi
],
[
if test "$HostOS" != "mingw32"
then
AC_PATH_PROG([$1], [$2])
fi
]
)
]) # FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
# FP_PROG_CONTEXT_DIFF
# --------------------
# Figure out how to do context diffs. Sets the output variable ContextDiffCmd.
...
...
compiler/main/SysTools.lhs
View file @
e6bfc596
...
...
@@ -251,8 +251,8 @@ initSysTools mbMinusB
ld_args = gcc_args
-- We just assume on command line
;
let
lc_prog
= "llc
"
lo_prog
= "opt
"
; lc_prog
<- getSetting "LLVM llc command
"
;
lo_prog
<- getSetting "LLVM opt command
"
; return $ Settings {
sTargetPlatform = Platform {
...
...
configure.ac
View file @
e6bfc596
...
...
@@ -349,6 +349,18 @@ FP_ARG_WITH_PATH_GNU_PROG([NM], [nm])
NmCmd="$NM"
AC_SUBST([NmCmd])
dnl ** Which LLVM llc to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([LLC], [llc])
LlcCmd="$LLC"
AC_SUBST([LlcCmd])
dnl ** Which LLVM opt to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([OPT], [opt])
OptCmd="$OPT"
AC_SUBST([OptCmd])
dnl ** Mac OS X: explicit deployment target
dnl --------------------------------------------------------------
AC_ARG_WITH([macosx-deployment-target],
...
...
mk/config.mk.in
View file @
e6bfc596
...
...
@@ -678,6 +678,9 @@ DTRACE = @DtraceCmd@
LD
=
@LdCmd@
NM
=
@NmCmd@
LLC
=
@LlcCmd@
OPT
=
@OptCmd@
# Some ld's support the -x flag and some don't, so the configure
# script detects which we have and sets LdXFlag to "-x" or ""
# respectively.
...
...
settings.in
View file @
e6bfc596
...
...
@@ -13,6 +13,8 @@
("target word size", "@WordSize@"),
("target has GNU nonexec stack", "@HaskellHaveGnuNonexecStack@"),
("target has .ident directive", "@HaskellHaveIdentDirective@"),
("target has subsections via symbols", "@HaskellHaveSubsectionsViaSymbols@")
("target has subsections via symbols", "@HaskellHaveSubsectionsViaSymbols@"),
("LLVM llc command", "@SettingsLlcCommand@"),
("LLVM opt command", "@SettingsOptCommand@")
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment