Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
1c0af76b
Commit
1c0af76b
authored
Mar 22, 2013
by
ian@well-typed.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the handling of ways, and in particular Opt_Static and Opt_SplitObjs
parent
9f03486a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
compiler/main/DynFlags.hs
compiler/main/DynFlags.hs
+11
-15
No files found.
compiler/main/DynFlags.hs
View file @
1c0af76b
...
...
@@ -1054,6 +1054,7 @@ wayDesc WayPar = "Parallel"
wayDesc
WayGran
=
"GranSim"
wayDesc
WayNDP
=
"Nested data parallelism"
-- Turn these flags on when enabling this way
wayGeneralFlags
::
Platform
->
Way
->
[
GeneralFlag
]
wayGeneralFlags
_
WayThreaded
=
[]
wayGeneralFlags
_
WayDebug
=
[]
...
...
@@ -1064,11 +1065,11 @@ wayGeneralFlags _ WayPar = [Opt_Parallel]
wayGeneralFlags
_
WayGran
=
[
Opt_GranMacros
]
wayGeneralFlags
_
WayNDP
=
[]
-- Turn these flags off when enabling this way
wayUnsetGeneralFlags
::
Platform
->
Way
->
[
GeneralFlag
]
wayUnsetGeneralFlags
_
WayThreaded
=
[]
wayUnsetGeneralFlags
_
WayDebug
=
[]
wayUnsetGeneralFlags
_
WayDyn
=
[
Opt_Static
,
-- There's no point splitting objects
wayUnsetGeneralFlags
_
WayDyn
=
[
-- There's no point splitting objects
-- when we're going to be dynamically
-- linking. Plus it breaks compilation
-- on OSX x86.
...
...
@@ -1849,7 +1850,10 @@ parseDynamicFlagsFull activeFlags cmdline dflags0 args = do
updateWays
::
DynFlags
->
DynFlags
updateWays
dflags
=
let
theWays
=
sort
$
nub
$
ways
dflags
in
dflags
{
f
=
if
WayDyn
`
elem
`
theWays
then
unSetGeneralFlag'
else
setGeneralFlag'
in
f
Opt_Static
$
dflags
{
ways
=
theWays
,
buildTag
=
mkBuildTag
(
filter
(
not
.
wayRTSOnly
)
theWays
),
rtsBuildTag
=
mkBuildTag
theWays
...
...
@@ -1964,7 +1968,7 @@ dynamic_flags = [
-- is required to get the RTS ticky support.
----- Linker --------------------------------------------------------
,
Flag
"static"
(
NoArg
(
removeWay
WayDyn
)
)
,
Flag
"static"
(
NoArg
removeWayDyn
)
,
Flag
"dynamic"
(
NoArg
(
addWay
WayDyn
))
-- ignored for compat w/ gcc:
,
Flag
"rdynamic"
(
NoArg
(
return
()
))
...
...
@@ -2687,7 +2691,7 @@ defaultFlags settings
++
(
if
pc_DYNAMIC_BY_DEFAULT
(
sPlatformConstants
settings
)
then
wayGeneralFlags
platform
WayDyn
else
[
Opt_Static
])
else
[]
)
where
platform
=
sTargetPlatform
settings
...
...
@@ -2980,16 +2984,8 @@ addWay' w dflags0 = let platform = targetPlatform dflags0
(
wayUnsetGeneralFlags
platform
w
)
in
dflags4
removeWay
::
Way
->
DynP
()
removeWay
w
=
do
upd
(
\
dfs
->
dfs
{
ways
=
filter
(
w
/=
)
(
ways
dfs
)
})
dfs
<-
liftEwM
getCmdLineState
let
platform
=
targetPlatform
dfs
-- XXX: wayExtras?
mapM_
unSetGeneralFlag
$
wayGeneralFlags
platform
w
mapM_
setGeneralFlag
$
wayUnsetGeneralFlags
platform
w
-- turn Opt_PIC back on if necessary for this platform:
mapM_
setGeneralFlag
$
default_PIC
platform
removeWayDyn
::
DynP
()
removeWayDyn
=
upd
(
\
dfs
->
dfs
{
ways
=
filter
(
WayDyn
/=
)
(
ways
dfs
)
})
--------------------------
setGeneralFlag
,
unSetGeneralFlag
::
GeneralFlag
->
DynP
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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