I've built this fine on X86/Linux, and I'll check it on SPARC/Solaris after I
fix the latest head breakage (and after that I'm forming the official "I hate
#ifdef" club...)
One question:
When you set GhcWithLlvmCodeGen = YES
should that enable -fllvm for the stage 1 compiler as well?
I ask because I tried to use -fllvm to bootstrap another ghc-head build, but it
died like this:
"inplace/bin/ghc-stage1" -M -include-pkg-deps -dep-makefile
libraries/dph/dph-par/dist-install/build/.depend-v-p-dyn.haskell.tmp
-dep-suffix p -dep-suffix dyn -O -H64m -fllvm -package-name dph-par-0.4.0
-hide-all-packages -i -ilibraries/dph/dph-par/../dph-common ....
ghc-stage1: unrecognised flags: -fllvm
The bootstrapping compiler supports -fllvm, but the stage 1 compiler built with
it doesn't seem to...
The mk/build.mk file I'm using says:
GhcLibWays = v
SRC_HC_OPTS = -O -H64m -fllvm
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcHcOpts = -Rghc-timing
GhcLibHcOpts = -O2 -XGenerics
GhcLibWays += p
ifeq "$(PlatformSupportsSharedLibs)" "YES"
GhcLibWays += dyn
endif
GhcWithLlvmCodeGen = YES
GhcEnableTablesNextToCode = NO
Also, a minor point on commenting the code:
With something like:
-- | Blocks consist of
-- * label: The code label for this block
-- * stmts: A list of LlvmStatement's representing the code for this block.
-- This list must end with a control flow. A return, tail call or
-- branch to another LlvmBlock within the current function scope.
data LlvmBlock = LlvmBlock {
blockLabel :: LlvmBlockId,
blockStmts :: [LlvmStatement]
}
You should use haddock style comments to describe the field directly, eg
-- | A block of LLVM code.
data LlvmBlock = LlvmBlock {
-- | The code label for this block
blockLabel :: LlvmBlockId,
-- | A list of LlvmStatement's representing the code for this block.
-- This list must end with a control flow. A return, tail call or
-- branch to another LlvmBlock within the current function scope.
blockStmts :: [LlvmStatement]
}
This can be fixed later though, so I don't think it should hold up the commit.
Ben.
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc