iserv: Don't build vanilla iserv unless vanilla libraries are built
authorBen Gamari <bgamari.foss@gmail.com>
Sat, 30 Sep 2017 03:33:29 +0000 (23:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 30 Sep 2017 13:30:09 +0000 (09:30 -0400)
Test Plan: Validate

Reviewers: austin, snowleopard

Subscribers: angerman, rwbarton, thomie, int-e

Differential Revision: https://phabricator.haskell.org/D4042

iserv/ghc.mk

index ff8b153..c5ca6a5 100644 (file)
@@ -69,15 +69,20 @@ iserv_stage2_INSTALL_INPLACE = YES
 iserv_stage2_p_INSTALL_INPLACE = YES
 iserv_stage2_dyn_INSTALL_INPLACE = YES
 
-$(eval $(call build-prog,iserv,stage2,1))
-
 ifeq "$(CLEANING)" "YES"
 
+NEED_iserv = YES
 NEED_iserv_p = YES
 NEED_iserv_dyn = YES
 
 else
 
+ifneq "$(findstring v, $(GhcLibWays))" ""
+NEED_iserv = YES
+else
+NEED_iserv = NO
+endif
+
 ifneq "$(findstring p, $(GhcLibWays))" ""
 NEED_iserv_p = YES
 else
@@ -91,6 +96,10 @@ NEED_iserv_dyn = NO
 endif
 endif
 
+ifeq "$(NEED_iserv)" "YES"
+$(eval $(call build-prog,iserv,stage2,1))
+endif
+
 ifeq "$(NEED_iserv_p)" "YES"
 $(eval $(call build-prog,iserv,stage2_p,1))
 endif