From ba1c6fcf382c1ad30adfc33952c9975a1fd9fc59 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 20 Oct 2011 17:32:10 +0200 Subject: [PATCH] Remove the last vestiges of main.ll Closes #992 --- Makefile.in | 3 +-- mk/clean.mk | 3 --- mk/dist.mk | 1 - mk/install.mk | 1 - mk/rt.mk | 16 ---------------- mk/target.mk | 14 -------------- src/rt/main.ll.in | 13 ------------- src/rt/main0.ll.in | 43 ------------------------------------------- 8 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 src/rt/main.ll.in delete mode 100644 src/rt/main0.ll.in diff --git a/Makefile.in b/Makefile.in index a2b1a86cef5..c12d592104e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,8 +256,7 @@ HOST_SREQ$(1) = \ TARGET_SREQ$(1)$(2) = \ $$(HOST_SREQ$(1)) \ $$(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME) \ - $$(TARGET_LIB$(1)$(2))/intrinsics.bc \ - $$(TARGET_LIB$(1)$(2))/main.o + $$(TARGET_LIB$(1)$(2))/intrinsics.bc # Prerequisites for complete stageN targets SREQ$(1)$(2) = \ diff --git a/mk/clean.mk b/mk/clean.mk index bf3dfb88ecc..2009df61f2d 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -22,8 +22,6 @@ clean-misc: $(Q)rm -f $(GENERATED) $(Q)rm -f rustllvm/$(CFG_RUSTLLVM) rustllvm/rustllvmbits.a $(Q)rm -f rt/$(CFG_RUNTIME) - $(Q)rm -f rt/main.o - $(Q)rm -f rt/main.ll $(Q)rm -f rt/libuv/uv.a $(Q)rm -Rf $(wildcard rt/libuv/src/*/*) $(Q)rm -f $(wildcard rt/libuv/src/*.o) @@ -60,7 +58,6 @@ clean$(1)$(2): $(Q)rm -f $$(TARGET_LIB$(1)$(2))/$(CFG_RUSTLLVM) $(Q)rm -f $$(TARGET_LIB$(1)$(2))/libstd.rlib $(Q)rm -f $$(TARGET_LIB$(1)$(2))/intrinsics.bc - $(Q)rm -f $$(TARGET_LIB$(1)$(2))/main.o endef diff --git a/mk/dist.mk b/mk/dist.mk index 5989b7eb687..89017c1d297 100644 --- a/mk/dist.mk +++ b/mk/dist.mk @@ -40,7 +40,6 @@ PKG_FILES = \ $(RUNTIME_S) \ rt/rustrt.def.in \ rt/intrinsics/intrinsics.ll.in \ - rt/main.ll.in \ $(RUSTLLVM_LIB_CS) $(RUSTLLVM_OBJS_CS) \ $(RUSTLLVM_HDR) \ rustllvm/rustllvm.def.in \ diff --git a/mk/install.mk b/mk/install.mk index badad0b1aac..6bdf301546a 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -32,7 +32,6 @@ install-target$(1): $$(SREQ$$(ISTAGE)$(1)) $(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),$$(CFG_RUNTIME)) $(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),$$(CFG_STDLIB)) $(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),intrinsics.bc) - $(Q)$(call INSTALL,$$(TL$(1)),$$(PTL$(1)),main.o) endef $(foreach target,$(CFG_TARGET_TRIPLES), \ diff --git a/mk/rt.mk b/mk/rt.mk index 3adb27d82e3..07d1879efc2 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -102,22 +102,6 @@ rt/%.o: rt/%.S $(MKFILES) @$(call E, compile: $@) $(Q)$(call CFG_COMPILE_C, $@, $(RUNTIME_INCS)) $< -ifdef CFG_WINDOWSY -rt/main.ll: rt/main.ll.in - @$(call E, sed: $@) - $(Q)sed 's/MAIN/WinMain@16/' < $^ > $@ -rt/main0.ll: rt/main0.ll.in - @$(call E, sed: $@) - $(Q)sed 's/MAIN/WinMain@16/' < $^ > $@ -else -rt/main.ll: rt/main.ll.in - @$(call E, sed: $@) - $(Q)sed 's/MAIN/main/' < $^ > $@ -rt/main0.ll: rt/main0.ll.in - @$(call E, sed: $@) - $(Q)sed 's/MAIN/main/' < $^ > $@ -endif - rt/%.o: rt/%.ll $(MKFILES) @$(call E, llc: $@) $(Q)$(LLC) -filetype=obj -relocation-model=pic -march=x86 -o $@ $< diff --git a/mk/target.mk b/mk/target.mk index f52d72f75e2..16ebf1eeb7c 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -23,23 +23,9 @@ $$(TARGET_LIB$(1)$(2))/libstd.rlib: \ @$$(call E, compile_and_link: $$@) $$(STAGE$(1)) --lib --static -o $$@ $$< -ifeq ($(1), 0) -$$(TARGET_LIB$(1)$(2))/main.o: rt/main0.o - @$$(call E, cp: $$@) - $$(Q)cp $$< $$@ - -$$(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME): stage0/lib/$$(CFG_RUNTIME) - @$$(call E, cp: $$@) - $$(Q)cp $$< $$@ -else -$$(TARGET_LIB$(1)$(2))/main.o: rt/main.o - @$$(call E, cp: $$@) - $$(Q)cp $$< $$@ - $$(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME): rt/$$(CFG_RUNTIME) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -endif $$(TARGET_LIB$(1)$(2))/$$(CFG_RUSTLLVM): rustllvm/$$(CFG_RUSTLLVM) @$$(call E, cp: $$@) diff --git a/src/rt/main.ll.in b/src/rt/main.ll.in deleted file mode 100644 index 8c19b2df251..00000000000 --- a/src/rt/main.ll.in +++ /dev/null @@ -1,13 +0,0 @@ -%0 = type { i32, [1 x i32] } -%1 = type { i32, i32 } -%2 = type { i32, %3 } -%3 = type { %tydesc*, %4, i1, {} } -%4 = type { i1*, i1* } -%5 = type { i32, i32, i32, i32, [0 x %6*] } -%6 = type { i32, i32, i32, i32, [0 x i8] } - -%tydesc = type { %tydesc**, i32, i32, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*, i8*, i8)* } - -%task = type { i32, i32, i32, i32, i32, i32, i32, i32 } - -%vec = type { i32, i32, [0 x i8] } diff --git a/src/rt/main0.ll.in b/src/rt/main0.ll.in deleted file mode 100644 index 6b0454cc31f..00000000000 --- a/src/rt/main0.ll.in +++ /dev/null @@ -1,43 +0,0 @@ -%0 = type { i32, [1 x i32] } -%1 = type { i32, i32 } -%2 = type { i32, %3 } -%3 = type { %tydesc*, %4, i1, {} } -%4 = type { i1*, i1* } -%5 = type { i32, i32, i32, i32, [0 x %6*] } -%6 = type { i32, i32, i32, i32, [0 x i8] } - -%tydesc = type { %tydesc**, i32, i32, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*, i8*, i8)* } - -%task = type { i32, i32, i32, i32, i32, i32, i32, i32 } - -%vec = type { i32, i32, [0 x i8] } - -@_rust_crate_map_toplevel = external global %0 - -declare i32 @rust_start(i32, i32, i32, i32) - -declare external fastcc void @_rust_main(i1* nocapture, %task*, %2* nocapture, %vec*) - -define void @_rust_main_wrap(i1* nocapture, %task *, %2* nocapture, %vec *) -{ - tail call fastcc void @_rust_main(i1* %0, %task *%1, %2* nocapture %2, %vec* %3) - ret void -} - -%nullary_fn = type void (i1*, %task*, %2*) - -define void @_rust_spawn_wrap( - i1* nocapture, %task*, %2* nocapture, %nullary_fn* %f) -{ - call void %f(i1* %0, %task *%1, %2* nocapture %2) - ret void -} - -declare external void @set_spawn_wrapper(void (i1*, %task*, %2*, %nullary_fn*)*); - -define i32 @"MAIN"(i32, i32) { - call void @set_spawn_wrapper(void (i1*, %task*, %2*, %nullary_fn*)* @_rust_spawn_wrap) - - %result = tail call i32 @rust_start(i32 ptrtoint (void (i1*, %task*, %2*, %vec*)* @_rust_main_wrap to i32), i32 %0, i32 %1, i32 ptrtoint (%0* @_rust_crate_map_toplevel to i32)) - ret i32 %result -}