From 0afafba73f675ed429368bb72a0e89414d50820d Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Tue, 19 Mar 2019 22:50:31 +0800 Subject: Unconditionally add keepCAFsForGHCi.c This brings us closer to being able to represent the compiler with a .cabal file. We do need to ensure that the rts exports `keepCAFs` though. --- compiler/ghc.mk | 14 -------------- rts/RtsSymbols.c | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 361ca87187..66b757d556 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -442,20 +442,6 @@ $(eval $(call build-package,compiler,stage1,0)) $(eval $(call build-package,compiler,stage2,1)) $(eval $(call build-package,compiler,stage3,2)) -# We only want to turn keepCAFs on if we will be loading dynamic -# Haskell libraries with GHCi. We therefore filter the object file -# out for non-dynamic ways. -define keepCAFsForGHCiDynOnly -# $1 = stage -# $2 = way -ifeq "$$(findstring dyn, $2)" "" -compiler_stage$1_$2_C_OBJS := $$(filter-out %/keepCAFsForGHCi.$$($2_osuf),$$(compiler_stage$1_$2_C_OBJS)) -endif -endef -$(foreach w,$(compiler_stage1_WAYS),$(eval $(call keepCAFsForGHCiDynOnly,1,$w))) -$(foreach w,$(compiler_stage2_WAYS),$(eval $(call keepCAFsForGHCiDynOnly,2,$w))) -$(foreach w,$(compiler_stage3_WAYS),$(eval $(call keepCAFsForGHCiDynOnly,3,$w))) - # after build-package, because that adds --enable-library-for-ghci # to compiler_stage*_CONFIGURE_OPTS: # We don't build the GHCi library for the ghc package. We can load it diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index eb0322ed3e..8f44a098e4 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -935,6 +935,7 @@ SymI_HasProto(load_load_barrier) \ SymI_HasProto(cas) \ SymI_HasProto(_assertFail) \ + SymI_HasProto(keepCAFs) \ RTS_USER_SIGNALS_SYMBOLS \ RTS_INTCHAR_SYMBOLS -- cgit v1.2.1