Reputation: 38708
When developing, I want to build everything with -O0
to save time.
But when building the same package on a CI system, I want to use -O
.
One option I see would be to have two different stack.yaml
files differing in their ghc-options
, but then I'd have to make all changes to stack.yaml
in two places.
Having an alias for stack --ghc-options=-O0
doesn't work, because I want -O0
to apply only to local packages, not the snapshot, and there's no way to specify that on the command line, from what I know.
Are there any better options?
Upvotes: 4
Views: 105
Reputation: 31305
Actually, stack build --ghc-options=-O0
will apply -O0 to only the local packages, not to the snapshot packages. For more information, see:
https://github.com/commercialhaskell/stack/blob/master/GUIDE.md#ghc-options
Upvotes: 2