• Oleg Grenrus's avatar
    llvmGen: Pass -optlo flags last to opt · 41db237e
    Oleg Grenrus authored
    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
    41db237e
Tasks.hs 13.7 KB