Skip to content

Commit 62fbd00

Browse files
committed
Only build LLVM tools Rust needs.
1 parent dd8b011 commit 62fbd00

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ DRIVER_CRATE := $(S)src/driver/driver.rs
371371
LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser jit mcjit \
372372
interpreter instrumentation
373373

374+
# Only build these LLVM tools
375+
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt
376+
374377
define DEF_LLVM_VARS
375378
# The configure script defines these variables with the target triples
376379
# separated by Z. This defines new ones with the expected format.

mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2828

2929
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3030
@$$(call E, make: llvm)
31-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1))
31+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1)) ONLY_TOOLS="$$(LLVM_TOOLS)"
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

0 commit comments

Comments
 (0)