From 6b3c7cb4e2e15dc9873a47ac2b3b9bf421e2858f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 3 Sep 2013 23:48:45 -0700 Subject: [PATCH] Build rustllvm into $target/rustllvm --- configure | 4 +--- mk/clean.mk | 2 +- mk/rustllvm.mk | 6 +++--- mk/target.mk | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 3733efa0e3e..de6256057e0 100755 --- a/configure +++ b/configure @@ -664,16 +664,14 @@ do make_dir $i done -make_dir llvm for t in $CFG_HOST_TRIPLES do make_dir $t/llvm done -make_dir rustllvm for t in $CFG_HOST_TRIPLES do - make_dir rustllvm/$t + make_dir $t/rustllvm done make_dir rt diff --git a/mk/clean.mk b/mk/clean.mk index fcb6a2b4290..5eefa5395b4 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -33,7 +33,7 @@ clean: clean-misc $(CLEAN_STAGE_RULES) clean-misc: @$(call E, cleaning) - $(Q)find rustllvm rt $(CFG_BUILD_TRIPLE)/test \ + $(Q)find $(CFG_BUILD_TRIPLE)/rustllvm rt $(CFG_BUILD_TRIPLE)/test \ -name '*.[odasS]' -o \ -name '*.so' -o \ -name '*.dylib' -o \ diff --git a/mk/rustllvm.mk b/mk/rustllvm.mk index ffe03598e53..d2f993855af 100644 --- a/mk/rustllvm.mk +++ b/mk/rustllvm.mk @@ -29,10 +29,10 @@ RUSTLLVM_DEF_$(1) := rustllvm/rustllvm$(CFG_DEF_SUFFIX_$(1)) RUSTLLVM_INCS_$(1) = $$(LLVM_EXTRA_INCDIRS_$(1)) \ -iquote $$(LLVM_INCDIR_$(1)) \ -iquote $$(S)src/rustllvm/include -RUSTLLVM_OBJS_OBJS_$(1) := $$(RUSTLLVM_OBJS_CS_$(1):rustllvm/%.cpp=rustllvm/$(1)/%.o) +RUSTLLVM_OBJS_OBJS_$(1) := $$(RUSTLLVM_OBJS_CS_$(1):rustllvm/%.cpp=$(1)/rustllvm/%.o) ALL_OBJ_FILES += $$(RUSTLLVM_OBJS_OBJS_$(1)) -rustllvm/$(1)/$(CFG_RUSTLLVM_$(1)): $$(RUSTLLVM_OBJS_OBJS_$(1)) \ +$(1)/rustllvm/$(CFG_RUSTLLVM_$(1)): $$(RUSTLLVM_OBJS_OBJS_$(1)) \ $$(MKFILE_DEPS) $$(RUSTLLVM_DEF_$(1)) @$$(call E, link: $$@) $$(Q)$$(call CFG_LINK_CXX_$(1),$$@,$$(RUSTLLVM_OBJS_OBJS_$(1)) \ @@ -40,7 +40,7 @@ rustllvm/$(1)/$(CFG_RUSTLLVM_$(1)): $$(RUSTLLVM_OBJS_OBJS_$(1)) \ $$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) \ $$(LLVM_LDFLAGS_$(1)),$$(RUSTLLVM_DEF_$(1)),$$(CFG_RUSTLLVM_$(1))) -rustllvm/$(1)/%.o: rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1)) +$(1)/rustllvm/%.o: rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1)) @$$(call E, compile: $$@) $$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(LLVM_CXXFLAGS_$(1)) $$(RUSTLLVM_INCS_$(1))) $$< endef diff --git a/mk/target.mk b/mk/target.mk index 0ddeb84e06a..7cd442ccb4d 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -86,7 +86,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)): \ ifneq ($$(findstring $(2),$$(CFG_HOST_TRIPLES)),) $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)): \ - rustllvm/$(2)/$(CFG_RUSTLLVM_$(3)) \ + $(2)/rustllvm/$(CFG_RUSTLLVM_$(3)) \ | $$(TLIB$(1)_T_$(2)_H_$(3))/ \ $(SNAPSHOT_RUSTC_POST_CLEANUP) @$$(call E, cp: $$@)