aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/llc/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/llc/Makefile b/tools/llc/Makefile
index 8eff3c1612..c4af6d806a 100644
--- a/tools/llc/Makefile
+++ b/tools/llc/Makefile
@@ -15,8 +15,18 @@ TOOLNAME = llc
# early so we can set up USEDLIBS properly before includeing Makefile.rules
include $(LEVEL)/Makefile.config
-# We always build the C Backend and the Skeleton
-USEDLIBS := LLVMCBackend LLVMSkeleton
+# Initialize the USEDLIBS so we can add to it
+USEDLIBS :=
+
+# Check for LLVMCBackend target
+ifneq ($(strip $(filter CBackend,$(TARGETS_TO_BUILD))),)
+USEDLIB += LLVMCBackend
+endif
+
+# Check for Skeleton target
+ifneq ($(strip $(filter Skeleton,$(TARGETS_TO_BUILD))),)
+USEDLIB += LLVMSkeleton
+endif
# Check for Sparc target
ifneq ($(strip $(filter SparcV8,$(TARGETS_TO_BUILD))),)