diff options
author | John Ericson <git@JohnEricson.me> | 2019-05-08 02:52:35 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-04 21:44:29 -0400 |
commit | 05419e55cab272ed39790695f448b311f22669f7 (patch) | |
tree | b3f652d4eb27c0ad6108edd6bca5fc73e165981a /rts/ghc.mk | |
parent | ec93d2a90a2d4f189feafd21575b9e9ba5ba9a5d (diff) | |
download | haskell-05419e55cab272ed39790695f448b311f22669f7.tar.gz |
Per stage headers, ghc_boot_platform.h -> stage 0 ghcplatform.h
The generated headers are now generated per stage, which means we can
skip hacks like `ghc_boot_platform.h` and just have that be the stage 0
header as proper. In general, stages are to be embraced: freely generate
everything in each stage but then just build what you depend on, and
everything is symmetrical and efficient. Trying to avoid stages because
bootstrapping is a mind bender just creates tons of bespoke
mini-mind-benders that add up to something far crazier.
Hadrian was pretty close to this "stage-major" approach already, and so
was fairly easy to fix. Make needed more work, however: it did know
about stages so at least there was a scaffold, but few packages except
for the compiler cared, and the compiler used its own counting system.
That said, make and Hadrian now work more similarly, which is good for
the transition to Hadrian. The merits of embracing stage aside, the
change may be worthy for easing that transition alone.
Diffstat (limited to 'rts/ghc.mk')
-rw-r--r-- | rts/ghc.mk | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk index 9cd66920c7..26865b5bb7 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -190,8 +190,12 @@ ifeq "$(NEED_DTRACE_PROBES_OBJ)" "YES" rts_$1_DTRACE_OBJS = rts/dist/build/RtsProbes.$$($1_osuf) $$(rts_$1_DTRACE_OBJS) : $$(rts_$1_OBJS) - $(DTRACE) -G -C $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) -DDTRACE -s rts/RtsProbes.d -o \ - $$@ $$(rts_$1_OBJS) + $(DTRACE) -G -C \ + $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) \ + -I$$(BUILD_1_INCLUDE_DIR) \ + -DDTRACE -s rts/RtsProbes.d \ + -o $$@ \ + $$(rts_$1_OBJS) endif endif @@ -352,7 +356,12 @@ endif # support for registerised builds on this arch. -- BL 2010/02/03 # WARNING_OPTS += -Wcast-align -STANDARD_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) -Irts -Irts/dist/build +STANDARD_OPTS += \ + $(addprefix -I,$(GHC_INCLUDE_DIRS)) \ + -I$(BUILD_1_INCLUDE_DIR) \ + -Irts \ + -Irts/dist/build + # COMPILING_RTS is only used when building Win32 DLL support. STANDARD_OPTS += -DCOMPILING_RTS -DFS_NAMESPACE=rts @@ -568,6 +577,10 @@ endif $(eval $(call dependencies,rts,dist,1)) +$(rts_dist_depfile_c_asm) : $(includes_dist_H_CONFIG) +$(rts_dist_depfile_c_asm) : $(includes_dist_H_PLATFORM) +$(rts_dist_depfile_c_asm) : $(includes_dist_H_VERSION) + $(rts_dist_depfile_c_asm) : $(DTRACEPROBES_H) ifneq "$(UseSystemLibFFI)" "YES" $(rts_dist_depfile_c_asm) : $(libffi_HEADERS) @@ -594,7 +607,7 @@ DTRACE_FLAGS = -x cpppath=$(CC) endif DTRACEPROBES_SRC = rts/RtsProbes.d -$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/. +$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) $(includes_1_H_PLATFORM) | $$(dir $$@)/. "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< endif @@ -610,9 +623,9 @@ ifeq "$(HaveLibMingwEx)" "YES" rts_PACKAGE_CPP_OPTS += -DHAVE_LIBMINGWEX endif -$(eval $(call manual-package-config,rts)) +$(eval $(call manual-package-config,rts,1)) -rts/package.conf.inplace : $(includes_H_CONFIG) $(includes_H_PLATFORM) +rts/dist/package.conf.inplace : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION) # ----------------------------------------------------------------------------- # installing |