Reputation: 4590
I have successfully built PortFusion
with the brand new 64-bit GHC 7.6.1 Release Candidate 1 for Windows.
Using freshly downloaded native 64-bit mingw
binaries from http://www.drangon.org/mingw, the network
package was as easy to install (after a bunch of non-relevant small fixes) as a simple
CC=mingw64/bin/gcc cabal install
There is also an LLVM
toolchain package on the same website.
Now I wonder how I could tell GHC
to use specific LLVM
binaries during compilation.
Would it be something as simple and similar to above as:
#v??v
LLVM=????????? ghc -W -O2 -fllvm -optlo-O3 --make src/Main.hs
LLVM=????????? cabal install PortFusion -f llvm #¹
#^??^
¹ relevant line in PortFusion.cabal defining the llvm
flag
or completely different?
Upvotes: 21
Views: 1043
Reputation: 14999
For the record, the answer to the question in the title is
ghc -pgmlo opt_cmd -pgmlc llc_cmd -fllvm ...
opt_cmd
and llc_cmd
can be either command names (that will be looked up in PATH
) or full pathnames.
Upvotes: 6
Reputation: 24602
You may be able to get GHC to use certain binaries by altering where they are defined in the PATH
environment variable. Earlier takes precedence. Presumably, System PATH
is also higher precedence than User PATH
.
Upvotes: 1