# 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"'