StaticFlags.hs 15.7 KB
Newer Older
1
2
3
{-# OPTIONS -fno-cse #-}
-- -fno-cse is needed for GLOBAL_VAR's to behave properly

4
5
6
7
8
9
10
11
12
13
14
15
16
-----------------------------------------------------------------------------
--
-- Static flags
--
-- Static flags can only be set once, on the command-line.  Inside GHC,
-- each static flag corresponds to a top-level value, usually of type Bool.
--
-- (c) The University of Glasgow 2005
--
-----------------------------------------------------------------------------

module StaticFlags (
	staticFlags,
17
        initStaticOpts,
18
19

	-- Ways
20
	WayName(..), Way(..), v_Ways, isRTSWay, mkBuildTag,
21
22
23

	-- Output style options
	opt_PprUserLength,
benl's avatar
benl committed
24
	opt_PprCols,
25
	opt_PprCaseAsLet,
benl's avatar
benl committed
26
	opt_PprStyle_Debug, opt_TraceLevel,
27
        opt_NoDebugOutput, 
benl's avatar
benl committed
28
29

	-- Suppressing boring aspects of core dumps
benl's avatar
benl committed
30
	opt_SuppressAll,
31
	opt_SuppressUniques,
32
        opt_SuppressCoercions,
33
	opt_SuppressModulePrefixes,
benl's avatar
benl committed
34
35
	opt_SuppressTypeApplications,
	opt_SuppressIdInfo,
benl's avatar
benl committed
36
	opt_SuppressTypeSignatures,
37
38
39
40

	-- profiling opts
	opt_SccProfilingOn,

andy@galois.com's avatar
andy@galois.com committed
41
42
43
        -- Hpc opts
	opt_Hpc,

44
45
46
47
48
49
50
	-- language opts
	opt_DictsStrict,
	opt_IrrefutableTuples,
	opt_Parallel,

	-- optimisation opts
	opt_NoStateHack,
51
        opt_SimpleListLiterals,
52
53
54
	opt_CprOff,
	opt_SimplNoPreInlining,
	opt_SimplExcessPrecision,
55
	opt_NoOptCoercion,
56
57
58
59
60
61
	opt_MaxWorkerArgs,

	-- Unfolding control
	opt_UF_CreationThreshold,
	opt_UF_UseThreshold,
	opt_UF_FunAppDiscount,
62
	opt_UF_DictDiscount,
63
64
65
	opt_UF_KeenessFactor,
	opt_UF_DearOp,

dias@eecs.harvard.edu's avatar
dias@eecs.harvard.edu committed
66
67
68
	-- Optimization fuel controls
	opt_Fuel,

69
70
71
72
	-- Related to linking
	opt_PIC,
	opt_Static,

73
74
75
76
77
78
79
80
81
	-- misc opts
	opt_IgnoreDotGhci,
	opt_ErrorSpans,
	opt_GranMacros,
	opt_HiVersion,
	opt_HistorySize,
	opt_OmitBlackHoling,
	opt_Unregisterised,
	v_Ld_inputs,
82
	tablesNextToCode,
83
        opt_StubDeadValues,
84
        opt_Ticky,
85
86

    -- For the parser
87
    addOpt, removeOpt, addWay, getWayFlags, v_opt_C_ready
88
89
90
91
  ) where

#include "HsVersions.h"

92
import Config
93
import FastString
94
import Util
95
import Maybes		( firstJusts )
96
import Panic
97

98
import Data.Maybe       ( listToMaybe )
Simon Marlow's avatar
Simon Marlow committed
99
100
import Data.IORef
import System.IO.Unsafe	( unsafePerformIO )
101
import Data.List
102
103
104
105

-----------------------------------------------------------------------------
-- Static flags

106
107
initStaticOpts :: IO ()
initStaticOpts = writeIORef v_opt_C_ready True
108

Ian Lynagh's avatar
Ian Lynagh committed
109
addOpt :: String -> IO ()
110
111
addOpt = consIORef v_opt_C

Ian Lynagh's avatar
Ian Lynagh committed
112
addWay :: WayName -> IO ()
113
addWay = consIORef v_Ways . lkupWay
114

Ian Lynagh's avatar
Ian Lynagh committed
115
removeOpt :: String -> IO ()
116
117
118
119
120
121
122
123
124
125
126
127
removeOpt f = do
  fs <- readIORef v_opt_C
  writeIORef v_opt_C $! filter (/= f) fs    

lookUp	       	 :: FastString -> Bool
lookup_def_int   :: String -> Int -> Int
lookup_def_float :: String -> Float -> Float
lookup_str       :: String -> Maybe String

-- holds the static opts while they're being collected, before
-- being unsafely read by unpacked_static_opts below.
GLOBAL_VAR(v_opt_C, defaultStaticOpts, [String])
128
GLOBAL_VAR(v_opt_C_ready, False, Bool)
Ian Lynagh's avatar
Ian Lynagh committed
129
130

staticFlags :: [String]
131
132
133
staticFlags = unsafePerformIO $ do
  ready <- readIORef v_opt_C_ready
  if (not ready)
134
        then panic "Static flags have not been initialised!\n        Please call GHC.newSession or GHC.parseStaticFlags early enough."
135
        else readIORef v_opt_C
136
137

-- -static is the default
Ian Lynagh's avatar
Ian Lynagh committed
138
defaultStaticOpts :: [String]
139
140
defaultStaticOpts = ["-static"]

Ian Lynagh's avatar
Ian Lynagh committed
141
packed_static_opts :: [FastString]
142
143
144
145
146
147
148
packed_static_opts   = map mkFastString staticFlags

lookUp     sw = sw `elem` packed_static_opts
	
-- (lookup_str "foo") looks for the flag -foo=X or -fooX, 
-- and returns the string X
lookup_str sw 
149
   = case firstJusts (map (stripPrefix sw) staticFlags) of
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
	Just ('=' : str) -> Just str
	Just str         -> Just str
	Nothing		 -> Nothing	

lookup_def_int sw def = case (lookup_str sw) of
			    Nothing -> def		-- Use default
		  	    Just xx -> try_read sw xx

lookup_def_float sw def = case (lookup_str sw) of
			    Nothing -> def		-- Use default
		  	    Just xx -> try_read sw xx


try_read :: Read a => String -> String -> a
-- (try_read sw str) tries to read s; if it fails, it
-- bleats about flag sw
try_read sw str
  = case reads str of
	((x,_):_) -> x	-- Be forgiving: ignore trailing goop, and alternative parses
	[]	  -> ghcError (UsageError ("Malformed argument " ++ str ++ " for flag " ++ sw))
Ian Lynagh's avatar
Ian Lynagh committed
170
			-- ToDo: hack alert. We should really parse the arguments
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
			-- 	 and announce errors in a more civilised way.


{-
 Putting the compiler options into temporary at-files
 may turn out to be necessary later on if we turn hsc into
 a pure Win32 application where I think there's a command-line
 length limit of 255. unpacked_opts understands the @ option.

unpacked_opts :: [String]
unpacked_opts =
  concat $
  map (expandAts) $
  map unpackFS argv  -- NOT ARGV any more: v_Static_hsc_opts
  where
   expandAts ('@':fname) = words (unsafePerformIO (readFile fname))
   expandAts l = [l]
-}

Ian Lynagh's avatar
Ian Lynagh committed
190
opt_IgnoreDotGhci :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
191
opt_IgnoreDotGhci		= lookUp (fsLit "-ignore-dot-ghci")
192

benl's avatar
benl committed
193
194
-- debugging options
-- | Suppress all that is suppressable in core dumps.
195
196
--   Except for uniques, as some simplifier phases introduce new varibles that
--   have otherwise identical names.
benl's avatar
benl committed
197
198
199
200
201
opt_SuppressAll :: Bool
opt_SuppressAll	
	= lookUp  (fsLit "-dsuppress-all")

-- | Suppress all coercions, them replacing with '...'
202
opt_SuppressCoercions :: Bool
benl's avatar
benl committed
203
204
205
opt_SuppressCoercions
	=  lookUp  (fsLit "-dsuppress-all") 
	|| lookUp  (fsLit "-dsuppress-coercions")
benl@ouroborus.net's avatar
benl@ouroborus.net committed
206

benl's avatar
benl committed
207
-- | Suppress module id prefixes on variables.
208
opt_SuppressModulePrefixes :: Bool
benl's avatar
benl committed
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
opt_SuppressModulePrefixes
	=  lookUp  (fsLit "-dsuppress-all")
	|| lookUp  (fsLit "-dsuppress-module-prefixes")

-- | Suppress type applications.
opt_SuppressTypeApplications :: Bool
opt_SuppressTypeApplications
	=  lookUp  (fsLit "-dsuppress-all")
	|| lookUp  (fsLit "-dsuppress-type-applications")

-- | Suppress info such as arity and unfoldings on identifiers.
opt_SuppressIdInfo :: Bool
opt_SuppressIdInfo 
	=  lookUp  (fsLit "-dsuppress-all")
	|| lookUp  (fsLit "-dsuppress-idinfo")
benl's avatar
benl committed
224
225
226
227
228
229
230

-- | Suppress seprate type signatures in core, but leave types on lambda bound vars
opt_SuppressTypeSignatures :: Bool
opt_SuppressTypeSignatures
	=  lookUp  (fsLit "-dsuppress-all")
	|| lookUp  (fsLit "-dsuppress-type-signatures")

231
232
233
234
235
236
-- | Suppress unique ids on variables.
--   Except for uniques, as some simplifier phases introduce new variables that
--   have otherwise identical names.
opt_SuppressUniques :: Bool
opt_SuppressUniques
	=  lookUp  (fsLit "-dsuppress-uniques")
237

238
239
-- | Display case expressions with a single alternative as strict let bindings
opt_PprCaseAsLet :: Bool
240
opt_PprCaseAsLet	= lookUp   (fsLit "-dppr-case-as-let")
benl's avatar
benl committed
241
242

-- | Set the maximum width of the dumps
243
244
245
246
--   If GHC's command line options are bad then the options parser uses the
--   pretty printer display the error message. In this case the staticFlags
--   won't be initialized yet, so we must check for this case explicitly 
--   and return the default value.
benl's avatar
benl committed
247
opt_PprCols :: Int
248
249
250
251
252
253
opt_PprCols 
 = unsafePerformIO
 $ do	ready <- readIORef v_opt_C_ready
	if (not ready)
		then return 100
		else return $ lookup_def_int "-dppr-cols" 100
benl's avatar
benl committed
254

255

dias@eecs.harvard.edu's avatar
dias@eecs.harvard.edu committed
256
opt_PprStyle_Debug  :: Bool
257
258
259
260
261
opt_PprStyle_Debug              = lookUp  (fsLit "-dppr-debug")

opt_TraceLevel :: Int
opt_TraceLevel = lookup_def_int "-dtrace-level" 1  	-- Standard level is 1
	       	 			    	        -- Less verbose is 0
benl@ouroborus.net's avatar
benl@ouroborus.net committed
262

dias@eecs.harvard.edu's avatar
dias@eecs.harvard.edu committed
263
opt_PprUserLength   :: Int
264
opt_PprUserLength	        = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name
benl@ouroborus.net's avatar
benl@ouroborus.net committed
265

dias@eecs.harvard.edu's avatar
dias@eecs.harvard.edu committed
266
267
opt_Fuel            :: Int
opt_Fuel                        = lookup_def_int "-dopt-fuel" maxBound
benl@ouroborus.net's avatar
benl@ouroborus.net committed
268

Simon Marlow's avatar
Simon Marlow committed
269
270
271
opt_NoDebugOutput   :: Bool
opt_NoDebugOutput               = lookUp  (fsLit "-dno-debug-output")

272
-- profiling opts
Ian Lynagh's avatar
Ian Lynagh committed
273
opt_SccProfilingOn :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
274
opt_SccProfilingOn		= lookUp  (fsLit "-fscc-profiling")
andy@galois.com's avatar
andy@galois.com committed
275

276
-- Hpc opts
Ian Lynagh's avatar
Ian Lynagh committed
277
opt_Hpc :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
278
opt_Hpc				= lookUp (fsLit "-fhpc")  
andy@galois.com's avatar
andy@galois.com committed
279

280
-- language opts
Ian Lynagh's avatar
Ian Lynagh committed
281
opt_DictsStrict :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
282
opt_DictsStrict			= lookUp  (fsLit "-fdicts-strict")
283

Ian Lynagh's avatar
Ian Lynagh committed
284
opt_IrrefutableTuples :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
285
opt_IrrefutableTuples		= lookUp  (fsLit "-firrefutable-tuples")
286

Ian Lynagh's avatar
Ian Lynagh committed
287
opt_Parallel :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
288
opt_Parallel			= lookUp  (fsLit "-fparallel")
289

290
291
292
opt_SimpleListLiterals :: Bool
opt_SimpleListLiterals	        = lookUp  (fsLit "-fsimple-list-literals")

Ian Lynagh's avatar
Ian Lynagh committed
293
opt_NoStateHack :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
294
opt_NoStateHack			= lookUp  (fsLit "-fno-state-hack")
295

Ian Lynagh's avatar
Ian Lynagh committed
296
opt_CprOff :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
297
opt_CprOff			= lookUp  (fsLit "-fcpr-off")
298
	-- Switch off CPR analysis in the new demand analyser
Ian Lynagh's avatar
Ian Lynagh committed
299
opt_MaxWorkerArgs :: Int
300
301
opt_MaxWorkerArgs		= lookup_def_int "-fmax-worker-args" (10::Int)

Ian Lynagh's avatar
Ian Lynagh committed
302
opt_GranMacros :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
303
opt_GranMacros			= lookUp  (fsLit "-fgransim")
304

Ian Lynagh's avatar
Ian Lynagh committed
305
opt_HiVersion :: Integer
306
opt_HiVersion			= read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
307

Ian Lynagh's avatar
Ian Lynagh committed
308
opt_HistorySize :: Int
309
opt_HistorySize			= lookup_def_int "-fhistory-size" 20
310

Ian Lynagh's avatar
Ian Lynagh committed
311
opt_OmitBlackHoling :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
312
opt_OmitBlackHoling		= lookUp  (fsLit "-dno-black-holing")
313

314
315
opt_StubDeadValues  :: Bool
opt_StubDeadValues		= lookUp  (fsLit "-dstub-dead-values")
316
317

-- Simplifier switches
Ian Lynagh's avatar
Ian Lynagh committed
318
opt_SimplNoPreInlining :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
319
opt_SimplNoPreInlining		= lookUp  (fsLit "-fno-pre-inlining")
320
321
	-- NoPreInlining is there just to see how bad things
	-- get if you don't do it!
Ian Lynagh's avatar
Ian Lynagh committed
322
opt_SimplExcessPrecision :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
323
opt_SimplExcessPrecision	= lookUp  (fsLit "-fexcess-precision")
324

325
326
327
opt_NoOptCoercion :: Bool
opt_NoOptCoercion    	        = lookUp  (fsLit "-fno-opt-coercion")

328
-- Unfolding control
329
330
331
332
-- See Note [Discounts and thresholds] in CoreUnfold

opt_UF_CreationThreshold, opt_UF_UseThreshold :: Int
opt_UF_DearOp, opt_UF_FunAppDiscount, opt_UF_DictDiscount :: Int
Ian Lynagh's avatar
Ian Lynagh committed
333
opt_UF_KeenessFactor :: Float
334

335
336
337
opt_UF_CreationThreshold = lookup_def_int "-funfolding-creation-threshold" (450::Int)
opt_UF_UseThreshold      = lookup_def_int "-funfolding-use-threshold"      (60::Int)
opt_UF_FunAppDiscount    = lookup_def_int "-funfolding-fun-discount"       (60::Int)
338

339
opt_UF_DictDiscount      = lookup_def_int "-funfolding-dict-discount"      (30::Int)
340
341
342
   -- Be fairly keen to inline a fuction if that means
   -- we'll be able to pick the right method from a dictionary

343
opt_UF_KeenessFactor	 = lookup_def_float "-funfolding-keeness-factor"   (1.5::Float)
344
opt_UF_DearOp            = ( 40 :: Int)
Ian Lynagh's avatar
Ian Lynagh committed
345

dias@eecs.harvard.edu's avatar
dias@eecs.harvard.edu committed
346
347

-- Related to linking
Ian Lynagh's avatar
Ian Lynagh committed
348
opt_PIC :: Bool
349
350
#if darwin_TARGET_OS && x86_64_TARGET_ARCH
opt_PIC                         = True
351
352
#elif darwin_TARGET_OS
opt_PIC                         = lookUp (fsLit "-fPIC") || not opt_Static
353
#else
Ian Lynagh's avatar
Ian Lynagh committed
354
opt_PIC                         = lookUp (fsLit "-fPIC")
355
#endif
Ian Lynagh's avatar
Ian Lynagh committed
356
opt_Static :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
357
opt_Static			= lookUp  (fsLit "-static")
Ian Lynagh's avatar
Ian Lynagh committed
358
opt_Unregisterised :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
359
opt_Unregisterised		= lookUp  (fsLit "-funregisterised")
360
361
362
363

-- Derived, not a real option.  Determines whether we will be compiling
-- info tables that reside just before the entry code, or with an
-- indirection to the entry code.  See TABLES_NEXT_TO_CODE in 
Simon Marlow's avatar
Simon Marlow committed
364
-- includes/rts/storage/InfoTables.h.
Ian Lynagh's avatar
Ian Lynagh committed
365
tablesNextToCode :: Bool
366
367
368
tablesNextToCode 		= not opt_Unregisterised
		 		  && cGhcEnableTablesNextToCode == "YES"

369
-- Include full span info in error messages, instead of just the start position.
Ian Lynagh's avatar
Ian Lynagh committed
370
opt_ErrorSpans :: Bool
Ian Lynagh's avatar
Ian Lynagh committed
371
opt_ErrorSpans			= lookUp (fsLit "-ferror-spans")
372

373
374
opt_Ticky :: Bool
opt_Ticky                       = lookUp (fsLit "-ticky")
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

-- object files and libraries to be linked in are collected here.
-- ToDo: perhaps this could be done without a global, it wasn't obvious
-- how to do it though --SDM.
GLOBAL_VAR(v_Ld_inputs,	[],      [String])

-----------------------------------------------------------------------------
-- Ways

-- The central concept of a "way" is that all objects in a given
-- program must be compiled in the same "way".  Certain options change
-- parameters of the virtual machine, eg. profiling adds an extra word
-- to the object header, so profiling objects cannot be linked with
-- non-profiling objects.

-- After parsing the command-line options, we determine which "way" we
391
-- are building - this might be a combination way, eg. profiling+threaded.
392
393
394
395
396
397
398
399
400

-- We then find the "build-tag" associated with this way, and this
-- becomes the suffix used to find .hi files and libraries used in
-- this compilation.

data WayName
  = WayThreaded
  | WayDebug
  | WayProf
Simon Marlow's avatar
Simon Marlow committed
401
  | WayEventLog
402
403
404
  | WayPar
  | WayGran
  | WayNDP
405
  | WayDyn
406
407
  deriving (Eq,Ord)

408
GLOBAL_VAR(v_Ways, [] ,[Way])
409

Ian Lynagh's avatar
Ian Lynagh committed
410
allowed_combination :: [WayName] -> Bool
411
412
413
414
415
416
417
allowed_combination way = and [ x `allowedWith` y 
			      | x <- way, y <- way, x < y ]
  where
	-- Note ordering in these tests: the left argument is
	-- <= the right argument, according to the Ord instance
	-- on Way above.

418
419
420
421
	-- dyn is allowed with everything
	_ `allowedWith` WayDyn  		= True
	WayDyn `allowedWith` _		        = True

422
423
424
425
426
	-- debug is allowed with everything
	_ `allowedWith` WayDebug		= True
	WayDebug `allowedWith` _		= True

	WayProf `allowedWith` WayNDP		= True
Simon Marlow's avatar
Simon Marlow committed
427
	WayThreaded `allowedWith` WayProf	= True
Simon Marlow's avatar
Simon Marlow committed
428
	WayThreaded `allowedWith` WayEventLog	= True
429
430
431
	_ `allowedWith` _ 			= False


432
433
434
435
436
437
getWayFlags :: IO [String]  -- new options
getWayFlags = do
  unsorted <- readIORef v_Ways
  let ways = sortBy (compare `on` wayName) $
             nubBy  ((==) `on` wayName) $ unsorted
  writeIORef v_Ways ways
438

439
  if not (allowed_combination (map wayName ways))
440
      then ghcError (CmdLineError $
441
442
      		    "combination not supported: "  ++
      		    foldr1 (\a b -> a ++ '/':b) 
443
444
445
      		    (map wayDesc ways))
      else
      	   return (concatMap wayOpts ways)
446

447
448
449
mkBuildTag :: [Way] -> String
mkBuildTag ways = concat (intersperse "_" (map wayTag ways))

Ian Lynagh's avatar
Ian Lynagh committed
450
lkupWay :: WayName -> Way
451
lkupWay w = 
452
   case listToMaybe (filter ((==) w . wayName) way_details) of
453
454
455
	Nothing -> error "findBuildTag"
	Just details -> details

Ian Lynagh's avatar
Ian Lynagh committed
456
isRTSWay :: WayName -> Bool
457
458
isRTSWay = wayRTSOnly . lkupWay 

459
data Way = Way {
460
  wayName    :: WayName,
461
462
  wayTag     :: String,
  wayRTSOnly :: Bool,
463
  wayDesc    :: String,
464
465
466
  wayOpts    :: [String]
  }

467
way_details :: [ Way ]
468
way_details =
469
  [ Way WayThreaded "thr" True "Threaded" [
470
#if defined(freebsd_TARGET_OS)
471
472
473
474
475
476
477
--	  "-optc-pthread"
--      , "-optl-pthread"
	-- FreeBSD's default threading library is the KSE-based M:N libpthread,
	-- which GHC has some problems with.  It's currently not clear whether
	-- the problems are our fault or theirs, but it seems that using the
	-- alternative 1:1 threading library libthr works around it:
	  "-optl-lthr"
kili's avatar
kili committed
478
479
480
#elif defined(openbsd_TARGET_OS)
	  "-optc-pthread"
	, "-optl-pthread"
481
482
#elif defined(solaris2_TARGET_OS)
          "-optl-lrt"
483
#endif
484
485
486
	],

    Way WayDebug "debug" True "Debug" [],
487

488
489
    Way WayDyn "dyn" False "Dynamic"
	[ "-DDYNAMIC"
490
491
492
493
494
495
	, "-optc-DDYNAMIC" 
#if defined(mingw32_TARGET_OS)
	-- On Windows, code that is to be linked into a dynamic library must be compiled
	--	with -fPIC. Labels not in the current package are assumed to be in a DLL 
	--	different from the current one.
	, "-fPIC"
kili's avatar
kili committed
496
497
498
499
#elif defined(openbsd_TARGET_OS)
	-- Without this, linking the shared libHSffi fails because
	-- it uses pthread mutexes.
	, "-optl-pthread"
500
501
#endif
	],
502

503
    Way WayProf "p" False "Profiling"
504
505
	[ "-fscc-profiling"
	, "-DPROFILING"
506
	, "-optc-DPROFILING" ],
507

508
    Way WayEventLog "l" True "RTS Event Logging"
509
510
	[ "-DTRACING"
	, "-optc-DTRACING" ],
Simon Marlow's avatar
Simon Marlow committed
511

512
    Way WayPar "mp" False "Parallel" 
513
514
515
516
517
518
519
	[ "-fparallel"
	, "-D__PARALLEL_HASKELL__"
	, "-optc-DPAR"
	, "-package concurrent"
        , "-optc-w"
        , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
        , "-optl-lpvm3"
520
        , "-optl-lgpvm3" ],
521
522

    -- at the moment we only change the RTS and could share compiler and libs!
523
    Way WayPar "mt" False "Parallel ticky profiling" 
524
525
526
527
528
529
530
531
	[ "-fparallel"
	, "-D__PARALLEL_HASKELL__"
	, "-optc-DPAR"
	, "-optc-DPAR_TICKY"
	, "-package concurrent"
        , "-optc-w"
        , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
        , "-optl-lpvm3"
532
        , "-optl-lgpvm3" ],
533

534
    Way WayPar "md" False "Distributed" 
535
536
537
538
539
540
541
542
543
	[ "-fparallel"
	, "-D__PARALLEL_HASKELL__"
	, "-D__DISTRIBUTED_HASKELL__"
	, "-optc-DPAR"
	, "-optc-DDIST"
	, "-package concurrent"
        , "-optc-w"
        , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
        , "-optl-lpvm3"
544
        , "-optl-lgpvm3" ],
545

546
    Way WayGran "mg" False "GranSim"
547
548
549
	[ "-fgransim"
	, "-D__GRANSIM__"
	, "-optc-DGRAN"
550
	, "-package concurrent" ],
551

552
    Way WayNDP "ndp" False "Nested data parallelism"
553
	[ "-XParr"
554
	, "-fvectorise"]
555
  ]