diff -rupN llvm-trunk.orig/lib/Transforms/Makefile llvm-trunk/lib/Transforms/Makefile
--- llvm-trunk.orig/lib/Transforms/Makefile	2011-11-04 13:11:19.928817000 -0400
+++ llvm-trunk/lib/Transforms/Makefile	2011-11-04 21:47:59.924418000 -0400
@@ -17,4 +17,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), C
   PARALLEL_DIRS := $(filter-out Hello, $(PARALLEL_DIRS))
 endif
 
+# Filter out shared libraries if not enabled.
+ifneq ($(ENABLE_SHARED),1)
+  PARALLEL_DIRS := $(filter-out Hello, $(PARALLEL_DIRS))
+endif
+
 include $(LEVEL)/Makefile.common
diff -rupN llvm-trunk.orig/runtime/Makefile llvm-trunk/runtime/Makefile
--- llvm-trunk.orig/runtime/Makefile	2011-11-04 13:10:04.860641000 -0400
+++ llvm-trunk/runtime/Makefile	2011-11-04 21:47:40.940785000 -0400
@@ -24,6 +24,11 @@ ifeq ($(TARGET_OS), $(filter $(TARGET_OS
 PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
 endif
 
+# Filter out shared libraries if not enabled.
+ifneq ($(ENABLE_SHARED),1)
+PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
+endif
+
 endif
 
 include $(LEVEL)/Makefile.common
diff -rupN llvm-trunk.orig/tools/Makefile llvm-trunk/tools/Makefile
--- llvm-trunk.orig/tools/Makefile	2011-11-04 13:10:09.584625000 -0400
+++ llvm-trunk/tools/Makefile	2011-11-04 21:47:34.395950000 -0400
@@ -71,12 +71,10 @@ ifdef LLVM_HAS_POLLY
 endif
 endif
 
-# On Win32, loadable modules can be built with ENABLE_SHARED.
+# Filter out shared libraries if not enabled.
 ifneq ($(ENABLE_SHARED),1)
-  ifneq (,$(filter $(HOST_OS), Cygwin MingW))
-    PARALLEL_DIRS := $(filter-out bugpoint-passes, \
-                        $(PARALLEL_DIRS))
-  endif
+  DIRS := $(filter-out gold lto, $(DIRS))
+  PARALLEL_DIRS := $(filter-out bugpoint-passes edis lto, $(PARALLEL_DIRS))
 endif
 
 include $(LEVEL)/Makefile.common
