Skip to content

Commit

Permalink
User-defined GHC flags override the default ones.
Browse files Browse the repository at this point in the history
When the same flag (eg. -vx) is instanciated several times with
different values, GHC uses the outermost one.
  • Loading branch information
picnoir committed Jan 22, 2019
1 parent 316f858 commit 7cf17f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion haskell/private/actions/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def _compilation_defaults(hs, cc, java, dep_info, srcs, import_dir_map, extra_sr
if hs.mode == "opt":
args.add("-O2")

args.add(ghc_args)
args.add(["-static"])
if with_profiling:
args.add("-prof", "-fexternal-interpreter")
Expand Down Expand Up @@ -230,6 +229,8 @@ def _compilation_defaults(hs, cc, java, dep_info, srcs, import_dir_map, extra_sr
"p_o",
])

args.add(ghc_args)

# Pass source files
for f in set.to_list(source_files):
args.add(f)
Expand Down

0 comments on commit 7cf17f9

Please sign in to comment.