-{-# OPTIONS -#include "hschooks.h" #-}
-
-----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.91 2002/04/05 23:24:29 sof Exp $
+-- $Id: DriverFlags.hs,v 1.97 2002/06/12 22:04:26 wolfgang Exp $
--
-- Driver flags
--
, ( "L" , Prefix (addToDirList v_Library_paths) )
, ( "l" , Prefix (add v_Cmdline_libraries) )
+#ifdef darwin_TARGET_OS
+ ------- Frameworks --------------------------------------------------
+ -- -framework-path should really be -F ...
+ , ( "framework-path" , HasArg (addToDirList v_Framework_paths) )
+ , ( "framework" , HasArg (add v_Cmdline_frameworks) )
+#endif
------- Packages ----------------------------------------------------
, ( "package-name" , HasArg (\s -> add v_Opt_C ("-inpackage="++s)) )
-- -fno-* pattern below doesn't work. We therefore allow
-- certain optimisation passes to be turned off explicitly:
, ( "fno-strictness" , NoArg (writeIORef v_Strictness False) )
-#ifdef OLD_STRICTNESS
- , ( "fno-cpr" , NoArg (writeIORef v_CPR False) )
-#endif
, ( "fno-cse" , NoArg (writeIORef v_CSE False) )
-- All other "-fno-<blah>" options cancel out "-f<blah>" on the hsc cmdline
-- on all other systems, quoting is necessary, to avoid interpretation
-- of shell metacharacters in the arguments (e.g. green-card's
-- -DBEGIN_GHC_ONLY='}-' trick).
-#ifndef mingw32_TARGET_OS
+#ifndef mingw32_HOST_OS
, ( "D", Prefix (\s -> addOpt_P ("-D'"++s++"'") ) )
, ( "U", Prefix (\s -> addOpt_P ("-U'"++s++"'") ) )
#else
( "warn-unused-matches", Opt_WarnUnusedMatches ),
( "warn-deprecations", Opt_WarnDeprecations ),
( "glasgow-exts", Opt_GlasgowExts ),
+ ( "fi", Opt_FFI ), -- support `-ffi'...
+ ( "ffi", Opt_FFI ), -- ...and also `-fffi'
+ ( "with", Opt_With ), -- with keyword
( "parr", Opt_PArr ),
( "allow-overlapping-instances", Opt_AllowOverlappingInstances ),
( "allow-undecidable-instances", Opt_AllowUndecidableInstances ),
"-DSTOLEN_X86_REGS="++show n_regs ]
)
+ | prefixMatch "ia64" cTARGETPLATFORM
+ = return ( [], ["-fomit-frame-pointer", "-G0"] )
+
| prefixMatch "mips" cTARGETPLATFORM
= return ( ["-static"], [] )