diff --git a/Makefile.in b/Makefile.in index 227dc87b6cb..85aaf879889 100644 --- a/Makefile.in +++ b/Makefile.in @@ -325,7 +325,6 @@ config.mk: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt # Primary-target makefiles ###################################################################### -include $(CFG_SRC_DIR)/mk/intrinsics.mk include $(CFG_SRC_DIR)/mk/target.mk include $(CFG_SRC_DIR)/mk/host.mk include $(CFG_SRC_DIR)/mk/stage0.mk diff --git a/configure b/configure index 20706bbdc9d..7676074e99e 100755 --- a/configure +++ b/configure @@ -229,6 +229,7 @@ then printf " %-32s %s\n" "CFG_LLVM_ROOT" "The host LLVM install" printf " %-32s %s\n" "CFG_PREFIX" "The installation prefix" printf " %-32s %s\n" "CFG_ONLY_GCC" "Prefer gcc to clang for building the runtime" + printf " %-32s %s\n" "CFG_TARGET_TRIPLES" "LLVM target triples" echo "" exit 0 fi @@ -363,8 +364,10 @@ then fi fi -# FIXME: add support for extending the target-triples list -CFG_TARGET_TRIPLES="${CFG_HOST_TRIPLE}" +if [ -z "$CFG_TARGET_TRIPLES" ] +then + CFG_TARGET_TRIPLES="${CFG_HOST_TRIPLE}" +fi putvar CFG_HOST_TRIPLE putvar CFG_TARGET_TRIPLES diff --git a/mk/intrinsics.mk b/mk/intrinsics.mk deleted file mode 100644 index 2a43b7c1667..00000000000 --- a/mk/intrinsics.mk +++ /dev/null @@ -1,19 +0,0 @@ -###################################################################### -# intrinsics.bc rules -###################################################################### - -# TODO: Use clang to compile the C++. -INTRINSICS_LL_IN := $(S)src/rt/intrinsics/intrinsics.ll.in -INTRINSICS_LL := intrinsics/intrinsics.ll -INTRINSICS_BC := intrinsics/intrinsics.bc - -$(INTRINSICS_LL): $(INTRINSICS_LL_IN) $(MKFILES) - @$(call E, mkdir: intrinsics) - $(Q)mkdir -p intrinsics - @$(call E, sed: $@) - $(Q)sed s/@CFG_TARGET_TRIPLE@/$(CFG_LLVM_TRIPLE)/g $< > $@ - -$(INTRINSICS_BC): $(INTRINSICS_LL) $(MKFILES) - @$(call E, llvm-as: $@) - $(Q)$(LLVM_AS) -o $@ $< - diff --git a/mk/target.mk b/mk/target.mk index 1b1d177e20f..8d082399ff7 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -15,17 +15,17 @@ INTR_HOST := $$(subst i686,i386,$$(TARGET_HOST)) $$(TARGET_LIB$(1)$(2))/intrinsics.ll: \ $$(S)src/rt/intrinsics/intrinsics.$$(INTR_HOST).ll.in @$$(call E, sed: $$@) - sed s/@CFG_TARGET_TRIPLE@/$(2)/ $$< > $$@ + $$(Q)sed s/@CFG_TARGET_TRIPLE@/$(2)/ $$< > $$@ $$(TARGET_LIB$(1)$(2))/intrinsics.bc: $$(TARGET_LIB$(1)$(2))/intrinsics.ll @$$(call E, llvms-as: $$@) - $$(LLVM_AS) -o $$@ $$< + $$(Q)$$(LLVM_AS) -o $$@ $$< $$(TARGET_LIB$(1)$(2))/$$(CFG_STDLIB): \ $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ $$(TARGET_SREQ$(1)$(2)) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) --lib -o $$@ $$< + $$(STAGE$(1)_$(2)) --lib -o $$@ $$< ifeq ($(1), 0) # FIXME: temporary @@ -38,7 +38,7 @@ $$(TARGET_LIB$(1)$(2))/libstd.rlib: \ $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ $$(TARGET_SREQ$(1)$(2)) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) --lib --static -o $$@ $$< + $$(STAGE$(1)_$(2)) --lib --static -o $$@ $$< $$(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME): rt/$$(CFG_RUNTIME) @$$(call E, cp: $$@) @@ -54,7 +54,7 @@ $$(TARGET_BIN$(1)$(2))/rustc$$(X): \ $$(TARGET_LIB$(1)$(2))/$$(CFG_RUSTLLVM) \ $$(TARGET_STDLIB_DEFAULT$(1)$(2)) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) -o $$@ $$< + $$(STAGE$(1)_$(2)) -o $$@ $$< $$(TARGET_LIB$(1)$(2))/$$(CFG_LIBRUSTC): \ $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \ @@ -62,7 +62,7 @@ $$(TARGET_LIB$(1)$(2))/$$(CFG_LIBRUSTC): \ $$(TARGET_LIB$(1)$(2))/$$(CFG_RUSTLLVM) \ $$(TARGET_STDLIB_DEFAULT$(1)$(2)) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) --lib -o $$@ $$< + $$(STAGE$(1)_$(2)) --lib -o $$@ $$< endef diff --git a/mk/tests.mk b/mk/tests.mk index e72db9fc0ec..145829f3437 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -150,7 +150,7 @@ check-stage$(1)-pretty-pretty: check-stage$(1)-pretty-pretty-dummy test/stdtest.stage$(1)$$(X): $$(STDTEST_CRATE) $$(STDTEST_INPUTS) \ $$(SREQ$(1)$$(CFG_HOST_TRIPLE)) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) -o $$@ $$< --test + $$(STAGE$(1)_$$(CFG_HOST_TRIPLE)) -o $$@ $$< --test check-stage$(1)-std-dummy: test/stdtest.stage$(1)$$(X) @$$(call E, run: $$<) @@ -166,7 +166,7 @@ test/rustctest.stage$(1)$$(X): \ $$(TARGET_LIB$(1)$$(CFG_HOST_TRIPLE))/$$(CFG_RUSTLLVM) \ $$(TARGET_LIB$(1)$$(CFG_HOST_TRIPLE))/$$(CFG_STDLIB) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) -o $$@ $$< --test + $$(STAGE$(1)_$$(CFG_HOST_TRIPLE)) -o $$@ $$< --test check-stage$(1)-rustc-dummy: test/rustctest.stage$(1)$$(X) @$$(call E, run: $$<) diff --git a/mk/tools.mk b/mk/tools.mk index 8805cd40be1..2bc495345b7 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -18,7 +18,7 @@ $$(TARGET_BIN$(1)$(CFG_HOST_TRIPLE))/fuzzer$$(X): \ $$(TARGET_LIB$(1)$(CFG_HOST_TRIPLE))/$$(CFG_STDLIB) \ $$(TARGET_LIB$(1)$(CFG_HOST_TRIPLE))/$$(CFG_LIBRUSTC) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) -o $$@ $$< + $$(STAGE$(1)_$(CFG_HOST_TRIPLE)) -o $$@ $$< # Promote the stageN target to stageN+1 host # FIXME: Shouldn't need to depend on host/librustc.so once @@ -35,7 +35,7 @@ $$(TARGET_BIN$(1)$(CFG_HOST_TRIPLE))/compiletest$$(X): \ $$(TARGET_SREQ$(1)$(CFG_HOST_TRIPLE)) \ $$(TARGET_LIB$(1)$(CFG_HOST_TRIPLE))/$$(CFG_STDLIB) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)) -o $$@ $$< + $$(STAGE$(1)_$(CFG_HOST_TRIPLE)) -o $$@ $$< $$(HOST_BIN$(2))/compiletest$$(X): \ $$(TARGET_BIN$(1)$(CFG_HOST_TRIPLE))/compiletest$$(X) \