[GHC] #8440: Get rid of the remaining static flags

GHC ghc-devs at haskell.org
Fri Feb 3 03:14:01 UTC 2017


#8440: Get rid of the remaining static flags
-------------------------------------+-------------------------------------
        Reporter:  thoughtpolice     |                Owner:
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2839
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"bbd3c399939311ec3e308721ab87ca6b9443f358/ghc" bbd3c39/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="bbd3c399939311ec3e308721ab87ca6b9443f358"
 Ditch static flags

 This patch converts the 4 lasting static flags (read from the command
 line and unsafely stored in immutable global variables) into dynamic
 flags. Most use cases have been converted into reading them from a
 DynFlags.

 In cases for which we don't have easy access to a DynFlags, we read from
 'unsafeGlobalDynFlags' that is set at the beginning of each 'runGhc'.
 It's not perfect (not thread-safe) but it is still better as we can
 set/unset these 4 flags before each run when using GHC API.

 Updates haddock submodule.

 Rebased and finished by: bgamari

 Test Plan: validate

 Reviewers: goldfire, erikd, hvr, austin, simonmar, bgamari

 Reviewed By: simonmar

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D2839

 GHC Trac Issues: #8440
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8440#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list