Skip to content

Commit

Permalink
Add profile and trace RTS args to beginning not end #2399
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Mar 19, 2017
1 parent b0d7e8c commit 7e060eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Major changes:

Behavior changes:

* `stack profile` and `stack trace` now add their extra RTS arguments for
benchmarks and tests to the beginning of the args, instead of the end.
See [#2399](https://github.com/commercialhaskell/stack/issues/2399)

Other enhancements:

* `stack setup` allow to control options passed to ghcjs-boot with
Expand Down
11 changes: 5 additions & 6 deletions src/Stack/Options/BuildMonoidParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ buildOptsMonoidParser hide0 =
{ buildMonoidLibProfile = First (Just True)
, buildMonoidExeProfile = First (Just True)
, buildMonoidBenchmarkOpts = bopts
{ beoMonoidAdditionalArgs = First (getFirst (beoMonoidAdditionalArgs bopts) <>
Just (" " <> unwords additionalArgs))
{ beoMonoidAdditionalArgs = First (Just (" " <> unwords additionalArgs) <>
getFirst (beoMonoidAdditionalArgs bopts))
}
, buildMonoidTestOpts = topts
{ toMonoidAdditionalArgs = toMonoidAdditionalArgs topts <>
additionalArgs
{ toMonoidAdditionalArgs = additionalArgs <> toMonoidAdditionalArgs topts
}
}
| noStripping =
| noStripping =
opts
{ buildMonoidLibStrip = First (Just False)
, buildMonoidExeStrip = First (Just False)
Expand Down Expand Up @@ -96,7 +95,7 @@ buildOptsMonoidParser hide0 =

options =
BuildOptsMonoid <$> libProfiling <*> exeProfiling <*> libStripping <*>
exeStripping <*> haddock <*> haddockOptsParser hideBool <*>
exeStripping <*> haddock <*> haddockOptsParser hideBool <*>
openHaddocks <*> haddockDeps <*> haddockInternal <*> copyBins <*>
preFetch <*> keepGoing <*> forceDirty <*> tests <*>
testOptsParser hideBool <*> benches <*> benchOptsParser hideBool <*>
Expand Down

0 comments on commit 7e060eb

Please sign in to comment.