# The standard suffix rule for compiling a Haskell file
# adds these flags to the command line
-# not sure if this is required --SDM
-main/Main_HC_OPTS = -fvia-C
-
prelude/PrimOp_HC_OPTS = -no-recomp -H80m
# because the NCG can't handle the 64-bit math in here
endif
# ByteCodeItbls uses primops that the NCG doesn't support yet.
-ghci/ByteCodeItbls_HC_OPTS = -fvia-C
-ghci/ByteCodeLink_HC_OPTS = -fvia-C -monly-3-regs
+ghci/ByteCodeItbls_HC_OPTS += -fvia-C
+ghci/ByteCodeLink_HC_OPTS += -fvia-C -monly-3-regs
+
+# BinIface and Binary take ages to both compile and run if you don's use -O
+main/BinIface_HC_OPTS += -O
+utils/Binary_HC_OPTS += -O
+utils/FastMutInt_HC_OPTS += -O
+
# CSE interacts badly with top-level IORefs (reportedly in DriverState and
# DriverMkDepend), causing some of them to be commoned up. We have a fix for
main/SysTools_HC_OPTS += '-\#include <windows.h>' '-\#include <process.h>'
endif
+# Required due to use of Concurrent.myThreadId
+utils/Panic_HC_OPTS += -fvia-C
+
# ghc_strlen percolates through so many modules that it is easier to get its
# prototype via a global option instead of a myriad of per-file OPTIONS
SRC_HC_OPTS += '-\#include "hschooks.h"'
primop-needs-wrapper.hs-incl \
primop-can-fail.hs-incl \
primop-strictness.hs-incl \
- primop-usage.hs-incl \
primop-primop-info.hs-incl
CLEAN_FILES += prelude/primops.txt
SRC_CPP_OPTS += ${GhcCppOpts}
ifneq "$(BootingFromHc)" "YES"
-prelude/PrimOp.lhs prelude/PrimOp.o: $(PRIMOP_BITS)
+prelude/PrimOp.lhs $(odir)/prelude/PrimOp.o: $(PRIMOP_BITS)
endif
ifneq "$(BootingFromHc)" "YES"
$(GENPOC) --can-fail < $< > $@
primop-strictness.hs-incl: prelude/primops.txt
$(GENPOC) --strictness < $< > $@
-primop-usage.hs-incl: prelude/primops.txt
- $(GENPOC) --usage < $< > $@
primop-primop-info.hs-incl: prelude/primops.txt
$(GENPOC) --primop-primop-info < $< > $@
+# Usages aren't used any more; but the generator
+# can still generate them if we want them back
+primop-usage.hs-incl: prelude/primops.txt
+ $(GENPOC) --usage < $< > $@
+
# ----------------------------------------------------------------------------