Commit 9548ec53 authored by ian@well-typed.com's avatar ian@well-typed.com

Tweak the _HC_OPTS variables

We no longer pass -hisuf/-osuf flags to "ghc -M". Doing so didn't really
make sense with the way the -dep-suffix flags now work.
parent 1c0af76b
......@@ -35,7 +35,7 @@ $$($1_$2_depfile_haskell) : $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC
$$(call removeFiles,$$@.tmp)
ifneq "$$($1_$2_HS_SRCS)" ""
"$$($1_$2_HC_MK_DEPEND)" -M \
$$(filter-out -split-objs, $$($1_$2_$$(firstword $$($1_$2_WAYS))_ALL_HC_OPTS)) \
$$($1_$2_$$(firstword $$($1_$2_WAYS))_MOST_DIR_HC_OPTS) \
$$($1_$2_MKDEPENDHS_FLAGS) \
$$($1_$2_HS_SRCS)
endif
......
......@@ -99,7 +99,6 @@ $1_$2_$3_MOST_HC_OPTS = \
$$(foreach opt,$$($1_$2_CPP_OPTS),-optP$$(opt)) \
$$(if $$($1_PACKAGE),-optP-include -optP$1/$2/build/autogen/cabal_macros.h) \
$$(foreach pkg,$$($1_$2_DEPS),-package $$(pkg)) \
$$(if $$(findstring YES,$$($1_$2_SplitObjs)),$$(if $$(findstring dyn,$3),,-split-objs),) \
$$($1_$2_HC_OPTS) \
$$(CONF_HC_OPTS_STAGE$4) \
$$($1_$2_MORE_HC_OPTS) \
......@@ -109,16 +108,20 @@ $1_$2_$3_MOST_HC_OPTS = \
$$(SRC_HC_WARNING_OPTS) \
$$(EXTRA_HC_OPTS)
$1_$2_$3_MOST_DIR_HC_OPTS = \
$$($1_$2_$3_MOST_HC_OPTS) \
-odir $1/$2/build -hidir $1/$2/build -stubdir $1/$2/build
# NB. CONF_HC_OPTS_STAGE$4 has to be late enough to override $1_$2_HC_OPTS, so
# that -O0 is effective (see #5484)
# $1_$2_$3_ALL_HC_OPTS: this is all the options we will pass to GHC
# for a given ($1,$2,$3).
$1_$2_$3_ALL_HC_OPTS = \
$$($1_$2_$3_MOST_HC_OPTS) \
$$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),$$(if $$(findstring v,$3),-dynamic-too)) \
-odir $1/$2/build -hidir $1/$2/build -stubdir $1/$2/build \
-hisuf $$($3_hisuf) -osuf $$($3_osuf) -hcsuf $$($3_hcsuf)
-hisuf $$($3_hisuf) -osuf $$($3_osuf) -hcsuf $$($3_hcsuf) \
$$($1_$2_$3_MOST_DIR_HC_OPTS) \
$$(if $$(findstring YES,$$($1_$2_SplitObjs)),$$(if $$(findstring dyn,$3),,-split-objs),) \
$$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),$$(if $$(findstring v,$3),-dynamic-too))
ifeq "$3" "dyn"
ifneq "$4" "0"
......
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