-# Only build edis if X86 target support is enabled.
-ifeq ($(filter $(TARGETS_TO_BUILD), X86),)
- PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS))
+# On Win32, loadable modules can be built with ENABLE_SHARED.
+ifneq ($(ENABLE_SHARED),1)
+ ifneq (,$(filter $(HOST_OS), Cygwin MingW))
+ PARALLEL_DIRS := $(filter-out bugpoint-passes, \
+ $(PARALLEL_DIRS))
+ endif