Commit cb1ee7e1 authored by Moritz Angermann's avatar Moritz Angermann Committed by Ben Gamari

Do not supply `-mcpu` if `-optlc` provides `-mcpu` already.

Reviewers: bgamari

Subscribers: thomie, carter

GHC Trac Issues: #14982

Differential Revision: https://phabricator.haskell.org/D4548
parent 0f046aae
......@@ -70,7 +70,7 @@ import System.Directory
import System.FilePath
import System.IO
import Control.Monad
import Data.List ( isSuffixOf, intercalate )
import Data.List ( isInfixOf, isSuffixOf, intercalate )
import Data.Maybe
import Data.Version
import Data.Either ( partitionEithers )
......@@ -823,7 +823,8 @@ llvmOptions dflags =
++ [("", "-filetype=obj") | fastLlvmPipeline dflags ]
-- Additional llc flags
++ [("", "-mcpu=" ++ mcpu) | not (null mcpu) ]
++ [("", "-mcpu=" ++ mcpu) | not (null mcpu)
, not (any (isInfixOf "-mcpu") (getOpts dflags opt_lc)) ]
++ [("", "-mattr=" ++ attrs) | not (null attrs) ]
where target = LLVM_TARGET
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment