Commit 305935d9 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Support for GHC flags -instantiated-with and -fno-code

New GhcOptions fields, 'ghcOptInstantiatedWith' for
@-instantiated-with@ and 'ghcOptNoCode' for @-fno-code@.
parent 5b378e48
......@@ -83,6 +83,11 @@ data GhcOptions = GhcOptions {
-- (we need to handle backwards compatibility.)
ghcOptThisUnitId :: Flag String,
ghcOptInstantiatedWith :: [(ModuleName, IndefModule)],
-- | No code? (But we turn on interface writing
ghcOptNoCode :: Flag Bool,
-- | GHC package databases to use, the @ghc -package-conf@ flag.
ghcOptPackageDBs :: PackageDBStack,
......@@ -398,6 +403,16 @@ renderGhcOptions comp _platform@(Platform _arch os) opts
, this_arg ]
| this_arg <- flag ghcOptThisUnitId ]
, if null (ghcOptInstantiatedWith opts)
then []
else "-instantiated-with"
: intercalate "," (map (\(n,m) -> display n ++ "="
++ display m)
(ghcOptInstantiatedWith opts))
: []
, concat [ ["-fno-code", "-fwrite-interface"] | flagBool ghcOptNoCode ]
, [ "-hide-all-packages" | flagBool ghcOptHideAllPackages ]
, [ "-no-auto-link-packages" | flagBool ghcOptNoAutoLinkPackages ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment