8556c188369e4d9660e79d0e7b728e18ef0c3748
[ghc-hetmet.git] / ghc / compiler / main / DriverState.hs
1 -----------------------------------------------------------------------------
2 -- $Id: DriverState.hs,v 1.39 2001/05/24 15:10:19 dsyme Exp $
3 --
4 -- Settings for the driver
5 --
6 -- (c) The University of Glasgow 2000
7 --
8 -----------------------------------------------------------------------------
9
10 module DriverState where
11
12 #include "HsVersions.h"
13
14 import CmStaticInfo
15 import CmdLineOpts
16 import DriverUtil
17 import Util
18 import Config
19 import Exception
20 import IOExts
21 #ifdef mingw32_TARGET_OS
22 import TmpFiles ( newTempName )
23 import Directory ( removeFile )
24 #endif
25 import Panic
26
27 import List
28 import Char  
29 import Monad
30
31 -----------------------------------------------------------------------------
32 -- non-configured things
33
34 cHaskell1Version = "5" -- i.e., Haskell 98
35
36 -----------------------------------------------------------------------------
37 -- Global compilation flags
38
39 -- location of compiler-related files
40 GLOBAL_VAR(v_TopDir,  error "no TOPDIR", String)
41
42 -- Cpp-related flags
43 v_Hs_source_cpp_opts = global
44         [ "-D__HASKELL1__="++cHaskell1Version
45         , "-D__GLASGOW_HASKELL__="++cProjectVersionInt                          
46         , "-D__HASKELL98__"
47         , "-D__CONCURRENT_HASKELL__"
48         ]
49 {-# NOINLINE v_Hs_source_cpp_opts #-}
50
51 -- Keep output from intermediate phases
52 GLOBAL_VAR(v_Keep_hi_diffs,             False,          Bool)
53 GLOBAL_VAR(v_Keep_hc_files,             False,          Bool)
54 GLOBAL_VAR(v_Keep_s_files,              False,          Bool)
55 GLOBAL_VAR(v_Keep_raw_s_files,          False,          Bool)
56 GLOBAL_VAR(v_Keep_tmp_files,            False,          Bool)
57
58 -- Misc
59 GLOBAL_VAR(v_Scale_sizes_by,            1.0,            Double)
60 GLOBAL_VAR(v_Dry_run,                   False,          Bool)
61 GLOBAL_VAR(v_Static,                    True,           Bool)
62 GLOBAL_VAR(v_NoHsMain,                  False,          Bool)
63 GLOBAL_VAR(v_Recomp,                    True,           Bool)
64 GLOBAL_VAR(v_Collect_ghc_timing,        False,          Bool)
65 GLOBAL_VAR(v_Do_asm_mangling,           True,           Bool)
66 GLOBAL_VAR(v_Excess_precision,          False,          Bool)
67
68 -----------------------------------------------------------------------------
69 -- Splitting object files (for libraries)
70
71 GLOBAL_VAR(v_Split_object_files,        False,          Bool)
72 GLOBAL_VAR(v_Split_prefix,              "",             String)
73 GLOBAL_VAR(v_N_split_files,             0,              Int)
74         
75 can_split :: Bool
76 can_split =  prefixMatch "i386"    cTARGETPLATFORM
77           || prefixMatch "alpha"   cTARGETPLATFORM
78           || prefixMatch "hppa"    cTARGETPLATFORM
79           || prefixMatch "m68k"    cTARGETPLATFORM
80           || prefixMatch "mips"    cTARGETPLATFORM
81           || prefixMatch "powerpc" cTARGETPLATFORM
82           || prefixMatch "rs6000"  cTARGETPLATFORM
83           || prefixMatch "sparc"   cTARGETPLATFORM
84
85 -----------------------------------------------------------------------------
86 -- Compiler output options
87
88 defaultHscLang
89   | cGhcWithNativeCodeGen == "YES" && 
90         (prefixMatch "i386" cTARGETPLATFORM ||
91          prefixMatch "sparc" cTARGETPLATFORM)   =  HscAsm
92   | otherwise                                   =  HscC
93
94 GLOBAL_VAR(v_Output_dir,  Nothing, Maybe String)
95 GLOBAL_VAR(v_Output_file, Nothing, Maybe String)
96 GLOBAL_VAR(v_Output_hi,   Nothing, Maybe String)
97
98 GLOBAL_VAR(v_Object_suf,  Nothing, Maybe String)
99 GLOBAL_VAR(v_HC_suf,      Nothing, Maybe String)
100 GLOBAL_VAR(v_Hi_suf,      "hi",    String)
101
102 GLOBAL_VAR(v_Ld_inputs, [],      [String])
103
104 odir_ify :: String -> IO String
105 odir_ify f = do
106   odir_opt <- readIORef v_Output_dir
107   case odir_opt of
108         Nothing -> return f
109         Just d  -> return (newdir d f)
110
111 osuf_ify :: String -> IO String
112 osuf_ify f = do
113   osuf_opt <- readIORef v_Object_suf
114   case osuf_opt of
115         Nothing -> return f
116         Just s  -> return (newsuf s f)
117
118 -----------------------------------------------------------------------------
119 -- Compiler optimisation options
120
121 GLOBAL_VAR(v_OptLevel, 0, Int)
122
123 setOptLevel :: String -> IO ()
124 setOptLevel ""              = do { writeIORef v_OptLevel 1 }
125 setOptLevel "not"           = writeIORef v_OptLevel 0
126 setOptLevel [c] | isDigit c = do
127    let level = ord c - ord '0'
128    writeIORef v_OptLevel level
129 setOptLevel s = unknownFlagErr ("-O"++s)
130
131 GLOBAL_VAR(v_minus_o2_for_C,            False, Bool)
132 GLOBAL_VAR(v_MaxSimplifierIterations,   4,     Int)
133 GLOBAL_VAR(v_StgStats,                  False, Bool)
134 GLOBAL_VAR(v_UsageSPInf,                False, Bool)  -- Off by default
135 GLOBAL_VAR(v_Strictness,                True,  Bool)
136 GLOBAL_VAR(v_CPR,                       True,  Bool)
137 GLOBAL_VAR(v_CSE,                       True,  Bool)
138
139 -- these are the static flags you get without -O.
140 hsc_minusNoO_flags =
141        [ 
142         "-fignore-interface-pragmas",
143         "-fomit-interface-pragmas",
144         "-fdo-lambda-eta-expansion",    -- This one is important for a tiresome reason:
145                                         -- we want to make sure that the bindings for data 
146                                         -- constructors are eta-expanded.  This is probably
147                                         -- a good thing anyway, but it seems fragile.
148         "-flet-no-escape"
149         ]
150
151 -- these are the static flags you get when -O is on.
152 hsc_minusO_flags =
153   [ 
154         "-fignore-asserts",
155         "-ffoldr-build-on",
156         "-fdo-eta-reduction",
157         "-fdo-lambda-eta-expansion",
158         "-fcase-merge",
159         "-flet-to-case",
160         "-flet-no-escape"
161    ]
162
163 hsc_minusO2_flags = hsc_minusO_flags    -- for now
164
165 getStaticOptimisationFlags 0 = hsc_minusNoO_flags
166 getStaticOptimisationFlags 1 = hsc_minusO_flags
167 getStaticOptimisationFlags n = hsc_minusO2_flags
168
169 buildCoreToDo :: IO [CoreToDo]
170 buildCoreToDo = do
171    opt_level  <- readIORef v_OptLevel
172    max_iter   <- readIORef v_MaxSimplifierIterations
173    usageSP    <- readIORef v_UsageSPInf
174    strictness <- readIORef v_Strictness
175    cpr        <- readIORef v_CPR
176    cse        <- readIORef v_CSE
177
178    if opt_level == 0 then return
179       [
180         CoreDoSimplify (isAmongSimpl [
181             MaxSimplifierIterations max_iter
182         ])
183       ]
184
185     else {- opt_level >= 1 -} return [ 
186
187         -- initial simplify: mk specialiser happy: minimum effort please
188         CoreDoSimplify (isAmongSimpl [
189             SimplInlinePhase 0,
190                         -- Don't inline anything till full laziness has bitten
191                         -- In particular, inlining wrappers inhibits floating
192                         -- e.g. ...(case f x of ...)...
193                         --  ==> ...(case (case x of I# x# -> fw x#) of ...)...
194                         --  ==> ...(case x of I# x# -> case fw x# of ...)...
195                         -- and now the redex (f x) isn't floatable any more
196             DontApplyRules,
197                         -- Similarly, don't apply any rules until after full 
198                         -- laziness.  Notably, list fusion can prevent floating.
199             NoCaseOfCase,
200                         -- Don't do case-of-case transformations.
201                         -- This makes full laziness work better
202             MaxSimplifierIterations max_iter
203         ]),
204
205         -- Specialisation is best done before full laziness
206         -- so that overloaded functions have all their dictionary lambdas manifest
207         CoreDoSpecialising,
208
209         CoreDoFloatOutwards False{-not full-},
210         CoreDoFloatInwards,
211
212         CoreDoSimplify (isAmongSimpl [
213            SimplInlinePhase 1,
214                 -- Want to run with inline phase 1 after the specialiser to give
215                 -- maximum chance for fusion to work before we inline build/augment
216                 -- in phase 2.  This made a difference in 'ansi' where an 
217                 -- overloaded function wasn't inlined till too late.
218            MaxSimplifierIterations max_iter
219         ]),
220
221         -- infer usage information here in case we need it later.
222         -- (add more of these where you need them --KSW 1999-04)
223         if usageSP then CoreDoUSPInf else CoreDoNothing,
224
225         CoreDoSimplify (isAmongSimpl [
226                 -- Need inline-phase2 here so that build/augment get 
227                 -- inlined.  I found that spectral/hartel/genfft lost some useful
228                 -- strictness in the function sumcode' if augment is not inlined
229                 -- before strictness analysis runs
230            SimplInlinePhase 2,
231            MaxSimplifierIterations max_iter
232         ]),
233
234         CoreDoSimplify (isAmongSimpl [
235            MaxSimplifierIterations 2
236                 -- No -finline-phase: allow all Ids to be inlined now
237                 -- This gets foldr inlined before strictness analysis
238         ]),
239
240         if strictness then CoreDoStrictness else CoreDoNothing,
241         if cpr        then CoreDoCPResult   else CoreDoNothing,
242         CoreDoWorkerWrapper,
243         CoreDoGlomBinds,
244
245         CoreDoSimplify (isAmongSimpl [
246            MaxSimplifierIterations max_iter
247                 -- No -finline-phase: allow all Ids to be inlined now
248         ]),
249
250         CoreDoFloatOutwards False{-not full-},
251                 -- nofib/spectral/hartel/wang doubles in speed if you
252                 -- do full laziness late in the day.  It only happens
253                 -- after fusion and other stuff, so the early pass doesn't
254                 -- catch it.  For the record, the redex is 
255                 --        f_el22 (f_el21 r_midblock)
256
257
258 -- Leave out lambda lifting for now
259 --        "-fsimplify", -- Tidy up results of full laziness
260 --          "[", 
261 --                "-fmax-simplifier-iterations2",
262 --          "]",
263 --        "-ffloat-outwards-full",      
264
265         -- We want CSE to follow the final full-laziness pass, because it may
266         -- succeed in commoning up things floated out by full laziness.
267         -- CSE used to rely on the no-shadowing invariant, but it doesn't any more
268
269         if cse then CoreCSE else CoreDoNothing,
270
271         CoreDoFloatInwards,
272
273 -- Case-liberation for -O2.  This should be after
274 -- strictness analysis and the simplification which follows it.
275
276         if opt_level >= 2 then
277            CoreLiberateCase
278         else
279            CoreDoNothing,
280         if opt_level >= 2 then
281            CoreDoSpecConstr
282         else
283            CoreDoNothing,
284
285         -- Final clean-up simplification:
286         CoreDoSimplify (isAmongSimpl [
287           MaxSimplifierIterations max_iter
288                 -- No -finline-phase: allow all Ids to be inlined now
289         ])
290      ]
291
292 buildStgToDo :: IO [ StgToDo ]
293 buildStgToDo = do
294   stg_stats <- readIORef v_StgStats
295   let flags1 | stg_stats = [ D_stg_stats ]
296              | otherwise = [ ]
297
298         -- STG passes
299   ways_ <- readIORef v_Ways
300   let flags2 | WayProf `elem` ways_ = StgDoMassageForProfiling : flags1
301              | otherwise            = flags1
302
303   return flags2
304
305 -----------------------------------------------------------------------------
306 -- Paths & Libraries
307
308 split_marker = ':'   -- not configurable (ToDo)
309
310 v_Import_paths, v_Include_paths, v_Library_paths :: IORef [String]
311 GLOBAL_VAR(v_Import_paths,  ["."], [String])
312 GLOBAL_VAR(v_Include_paths, ["."], [String])
313 GLOBAL_VAR(v_Library_paths, [],  [String])
314
315 GLOBAL_VAR(v_Cmdline_libraries,   [], [String])
316
317 addToDirList :: IORef [String] -> String -> IO ()
318 addToDirList ref path
319   = do paths <- readIORef ref
320        writeIORef ref (paths ++ split split_marker path)
321
322 GLOBAL_VAR(v_HCHeader, "", String)
323
324 -----------------------------------------------------------------------------
325 -- Packages
326
327 GLOBAL_VAR(v_Path_package_config, error "path_package_config", String)
328
329 -- package list is maintained in dependency order
330 GLOBAL_VAR(v_Packages, ("std":"rts":"gmp":[]), [String])
331
332 addPackage :: String -> IO ()
333 addPackage package
334   = do pkg_details <- readIORef v_Package_details
335        case lookupPkg package pkg_details of
336           Nothing -> throwDyn (CmdLineError ("unknown package name: " ++ package))
337           Just details -> do
338             ps <- readIORef v_Packages
339             unless (package `elem` ps) $ do
340                 mapM_ addPackage (package_deps details)
341                 ps <- readIORef v_Packages
342                 writeIORef v_Packages (package:ps)
343
344 getPackageImportPath   :: IO [String]
345 getPackageImportPath = do
346   ps <- getPackageInfo
347   return (nub (concat (map import_dirs ps)))
348
349 getPackageIncludePath   :: IO [String]
350 getPackageIncludePath = do
351   ps <- getPackageInfo
352   return (nub (filter (not.null) (concatMap include_dirs ps)))
353
354         -- includes are in reverse dependency order (i.e. rts first)
355 getPackageCIncludes   :: IO [String]
356 getPackageCIncludes = do
357   ps <- getPackageInfo
358   return (reverse (nub (filter (not.null) (concatMap c_includes ps))))
359
360 getPackageLibraryPath  :: IO [String]
361 getPackageLibraryPath = do
362   ps <- getPackageInfo
363   return (nub (concat (map library_dirs ps)))
364
365 getPackageLibraries    :: IO [String]
366 getPackageLibraries = do
367   ps <- getPackageInfo
368   tag <- readIORef v_Build_tag
369   let suffix = if null tag then "" else '_':tag
370   return (concat (
371         map (\p -> map (++suffix) (hs_libraries p) ++ extra_libraries p) ps
372      ))
373
374 getPackageExtraGhcOpts :: IO [String]
375 getPackageExtraGhcOpts = do
376   ps <- getPackageInfo
377   return (concatMap extra_ghc_opts ps)
378
379 getPackageExtraCcOpts  :: IO [String]
380 getPackageExtraCcOpts = do
381   ps <- getPackageInfo
382   return (concatMap extra_cc_opts ps)
383
384 getPackageExtraLdOpts  :: IO [String]
385 getPackageExtraLdOpts = do
386   ps <- getPackageInfo
387   return (concatMap extra_ld_opts ps)
388
389 getPackageInfo :: IO [PackageConfig]
390 getPackageInfo = do
391   ps <- readIORef v_Packages
392   getPackageDetails ps
393
394 getPackageDetails :: [String] -> IO [PackageConfig]
395 getPackageDetails ps = do
396   pkg_details <- readIORef v_Package_details
397   return [ pkg | p <- ps, Just pkg <- [ lookupPkg p pkg_details ] ]
398
399 GLOBAL_VAR(v_Package_details, (error "package_details"), [PackageConfig])
400
401 lookupPkg :: String -> [PackageConfig] -> Maybe PackageConfig
402 lookupPkg nm ps
403    = case [p | p <- ps, name p == nm] of
404         []    -> Nothing
405         (p:_) -> Just p
406 -----------------------------------------------------------------------------
407 -- Ways
408
409 -- The central concept of a "way" is that all objects in a given
410 -- program must be compiled in the same "way".  Certain options change
411 -- parameters of the virtual machine, eg. profiling adds an extra word
412 -- to the object header, so profiling objects cannot be linked with
413 -- non-profiling objects.
414
415 -- After parsing the command-line options, we determine which "way" we
416 -- are building - this might be a combination way, eg. profiling+ticky-ticky.
417
418 -- We then find the "build-tag" associated with this way, and this
419 -- becomes the suffix used to find .hi files and libraries used in
420 -- this compilation.
421
422 GLOBAL_VAR(v_Build_tag, "", String)
423
424 data WayName
425   = WayProf
426   | WayUnreg
427   | WayTicky
428   | WayPar
429   | WayGran
430   | WaySMP
431   | WayDebug
432   | WayUser_a
433   | WayUser_b
434   | WayUser_c
435   | WayUser_d
436   | WayUser_e
437   | WayUser_f
438   | WayUser_g
439   | WayUser_h
440   | WayUser_i
441   | WayUser_j
442   | WayUser_k
443   | WayUser_l
444   | WayUser_m
445   | WayUser_n
446   | WayUser_o
447   | WayUser_A
448   | WayUser_B
449   deriving (Eq,Ord)
450
451 GLOBAL_VAR(v_Ways, [] ,[WayName])
452
453 allowed_combination way = way `elem` combs
454   where  -- the sub-lists must be ordered according to WayName, 
455          -- because findBuildTag sorts them
456     combs                = [ [WayProf,WayUnreg], [WayProf,WaySMP] ]
457
458 findBuildTag :: IO [String]  -- new options
459 findBuildTag = do
460   way_names <- readIORef v_Ways
461   case sort way_names of
462      []  -> do  -- writeIORef v_Build_tag ""
463                 return []
464
465      [w] -> do let details = lkupWay w
466                writeIORef v_Build_tag (wayTag details)
467                return (wayOpts details)
468
469      ws  -> if not (allowed_combination ws)
470                 then throwDyn (CmdLineError $
471                                 "combination not supported: "  ++
472                                 foldr1 (\a b -> a ++ '/':b) 
473                                 (map (wayName . lkupWay) ws))
474                 else let stuff = map lkupWay ws
475                          tag   = concat (map wayTag stuff)
476                          flags = map wayOpts stuff
477                      in do
478                      writeIORef v_Build_tag tag
479                      return (concat flags)
480
481 lkupWay w = 
482    case lookup w way_details of
483         Nothing -> error "findBuildTag"
484         Just details -> details
485
486 data Way = Way {
487   wayTag   :: String,
488   wayName  :: String,
489   wayOpts  :: [String]
490   }
491
492 way_details :: [ (WayName, Way) ]
493 way_details =
494   [ (WayProf, Way  "p" "Profiling"  
495         [ "-fscc-profiling"
496         , "-DPROFILING"
497         , "-optc-DPROFILING"
498         , "-fvia-C" ]),
499
500     (WayTicky, Way  "t" "Ticky-ticky Profiling"  
501         [ "-fticky-ticky"
502         , "-DTICKY_TICKY"
503         , "-optc-DTICKY_TICKY"
504         , "-fvia-C" ]),
505
506     (WayUnreg, Way  "u" "Unregisterised" 
507         unregFlags ),
508
509     -- optl's below to tell linker where to find the PVM library -- HWL
510     (WayPar, Way  "mp" "Parallel" 
511         [ "-fparallel"
512         , "-D__PARALLEL_HASKELL__"
513         , "-optc-DPAR"
514         , "-package concurrent"
515         , "-optc-w"
516         , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
517         , "-optl-lpvm3"
518         , "-optl-lgpvm3"
519         , "-fvia-C" ]),
520
521     -- at the moment we only change the RTS and could share compiler and libs!
522     (WayPar, Way  "mt" "Parallel ticky profiling" 
523         [ "-fparallel"
524         , "-D__PARALLEL_HASKELL__"
525         , "-optc-DPAR"
526         , "-optc-DPAR_TICKY"
527         , "-package concurrent"
528         , "-optc-w"
529         , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
530         , "-optl-lpvm3"
531         , "-optl-lgpvm3"
532         , "-fvia-C" ]),
533
534     (WayPar, Way  "md" "Distributed" 
535         [ "-fparallel"
536         , "-D__PARALLEL_HASKELL__"
537         , "-D__DISTRIBUTED_HASKELL__"
538         , "-optc-DPAR"
539         , "-optc-DDIST"
540         , "-package concurrent"
541         , "-optc-w"
542         , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}"
543         , "-optl-lpvm3"
544         , "-optl-lgpvm3"
545         , "-fvia-C" ]),
546
547     (WayGran, Way  "mg" "GranSim" 
548         [ "-fgransim"
549         , "-D__GRANSIM__"
550         , "-optc-DGRAN"
551         , "-package concurrent"
552         , "-fvia-C" ]),
553
554     (WaySMP, Way  "s" "SMP"
555         [ "-fsmp"
556         , "-optc-pthread"
557         , "-optl-pthread"
558         , "-optc-DSMP"
559         , "-fvia-C" ]),
560
561     (WayUser_a,  Way  "a"  "User way 'a'"  ["$WAY_a_REAL_OPTS"]),       
562     (WayUser_b,  Way  "b"  "User way 'b'"  ["$WAY_b_REAL_OPTS"]),       
563     (WayUser_c,  Way  "c"  "User way 'c'"  ["$WAY_c_REAL_OPTS"]),       
564     (WayUser_d,  Way  "d"  "User way 'd'"  ["$WAY_d_REAL_OPTS"]),       
565     (WayUser_e,  Way  "e"  "User way 'e'"  ["$WAY_e_REAL_OPTS"]),       
566     (WayUser_f,  Way  "f"  "User way 'f'"  ["$WAY_f_REAL_OPTS"]),       
567     (WayUser_g,  Way  "g"  "User way 'g'"  ["$WAY_g_REAL_OPTS"]),       
568     (WayUser_h,  Way  "h"  "User way 'h'"  ["$WAY_h_REAL_OPTS"]),       
569     (WayUser_i,  Way  "i"  "User way 'i'"  ["$WAY_i_REAL_OPTS"]),       
570     (WayUser_j,  Way  "j"  "User way 'j'"  ["$WAY_j_REAL_OPTS"]),       
571     (WayUser_k,  Way  "k"  "User way 'k'"  ["$WAY_k_REAL_OPTS"]),       
572     (WayUser_l,  Way  "l"  "User way 'l'"  ["$WAY_l_REAL_OPTS"]),       
573     (WayUser_m,  Way  "m"  "User way 'm'"  ["$WAY_m_REAL_OPTS"]),       
574     (WayUser_n,  Way  "n"  "User way 'n'"  ["$WAY_n_REAL_OPTS"]),       
575     (WayUser_o,  Way  "o"  "User way 'o'"  ["$WAY_o_REAL_OPTS"]),       
576     (WayUser_A,  Way  "A"  "User way 'A'"  ["$WAY_A_REAL_OPTS"]),       
577     (WayUser_B,  Way  "B"  "User way 'B'"  ["$WAY_B_REAL_OPTS"]) 
578   ]
579
580 unregFlags = 
581    [ "-optc-DNO_REGS"
582    , "-optc-DUSE_MINIINTERPRETER"
583    , "-fno-asm-mangling"
584    , "-funregisterised"
585    , "-fvia-C" ]
586
587 -----------------------------------------------------------------------------
588 -- Programs for particular phases
589
590 GLOBAL_VAR(v_Pgm_L,   error "pgm_L", String)
591 GLOBAL_VAR(v_Pgm_P,   cRAWCPP,       String)
592 GLOBAL_VAR(v_Pgm_c,   cGCC,          String)
593 GLOBAL_VAR(v_Pgm_m,   error "pgm_m", String)
594 GLOBAL_VAR(v_Pgm_s,   error "pgm_s", String)
595 GLOBAL_VAR(v_Pgm_a,   cGCC,          String)
596 GLOBAL_VAR(v_Pgm_l,   cGCC,          String)
597 GLOBAL_VAR(v_Pgm_dll, cMkDLL,        String)
598
599 GLOBAL_VAR(v_Opt_dep,    [], [String])
600 GLOBAL_VAR(v_Anti_opt_C, [], [String])
601 GLOBAL_VAR(v_Opt_C,      [], [String])
602 GLOBAL_VAR(v_Opt_l,      [], [String])
603 GLOBAL_VAR(v_Opt_dll,    [], [String])
604
605 getStaticOpts :: IORef [String] -> IO [String]
606 getStaticOpts ref = readIORef ref >>= return . reverse