[GHC] #14821: -O2 forces -optlo-O3 in a way that cannot be overridden at command line

GHC ghc-devs at haskell.org
Mon Mar 26 00:59:30 UTC 2018


#14821: -O2 forces -optlo-O3 in a way that cannot be overridden at command line
-------------------------------------+-------------------------------------
        Reporter:  joeyhess          |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler (LLVM)   |              Version:  8.0.2
      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:D4421
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"41db237e1290b650e52eb07323eca71de941e184/ghc"
 41db237e/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="41db237e1290b650e52eb07323eca71de941e184"
 llvmGen: Pass -optlo flags last to opt

 LLVM, like GHC, processes flags in the order that they appear.
 Consequently, we need to ensure the user-provided flags appear last so
 they can override flags produced by GHC. See #14821.

 Test Plan: `ghc -O2 -optlo-O2 -v3 $FILE` and ensure that `opt` and `llc`
 are invoked with `-O2`.

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #14821

 Differential Revision: https://phabricator.haskell.org/D4421
 }}}

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


More information about the ghc-tickets mailing list