Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
df2bcd8a
Commit
df2bcd8a
authored
Oct 25, 2012
by
ian@well-typed.com
Browse files
Set the default way correctly when dynamic-by-default
parent
c67b4313
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
df2bcd8a
...
...
@@ -66,6 +66,7 @@ module DynFlags (
-- ** Manipulating DynFlags
defaultDynFlags
,
-- Settings -> DynFlags
defaultWays
,
initDynFlags
,
-- DynFlags -> IO DynFlags
defaultFatalMessager
,
defaultLogAction
,
...
...
@@ -1183,9 +1184,9 @@ defaultDynFlags mySettings =
packageFlags
=
[]
,
pkgDatabase
=
Nothing
,
pkgState
=
panic
"no package state yet: call GHC.setSessionDynFlags"
,
ways
=
[]
,
buildTag
=
mkBuildTag
[]
,
rtsBuildTag
=
mkBuildTag
[]
,
ways
=
defaultWays
mySettings
,
buildTag
=
mkBuildTag
(
defaultWays
mySettings
)
,
rtsBuildTag
=
mkBuildTag
(
defaultWays
mySettings
)
,
splitInfo
=
Nothing
,
settings
=
mySettings
,
-- ghc -M values
...
...
@@ -1240,6 +1241,11 @@ defaultDynFlags mySettings =
interactivePrint
=
Nothing
}
defaultWays
::
Settings
->
[
Way
]
defaultWays
settings
=
if
pc_dYNAMIC_BY_DEFAULT
(
sPlatformConstants
settings
)
then
[
WayDyn
]
else
[]
--------------------------------------------------------------------------
type
FatalMessager
=
String
->
IO
()
...
...
ghc/Main.hs
View file @
df2bcd8a
...
...
@@ -292,7 +292,7 @@ checkOptions mode dflags srcs objs = do
hPutStrLn
stderr
(
"Warning: -debug, -threaded and -ticky are ignored by GHCi"
)
-- -prof and --interactive are not a good combination
when
(
notNull
(
filter
(
not
.
wayRTSOnly
)
(
ways
dflags
))
when
((
filter
(
not
.
wayRTSOnly
)
(
ways
dflags
)
/=
defaultWays
(
settings
dflags
))
&&
isInterpretiveMode
mode
)
$
do
ghcError
(
UsageError
"--interactive can't be used with -prof or -unreg."
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment