Remove the last vestiges of main.ll

Closes #992
This commit is contained in:
Marijn Haverbeke 2011-10-20 17:32:10 +02:00
parent ef63f09dcd
commit ba1c6fcf38
8 changed files with 1 additions and 93 deletions

View File

@ -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) = \

View File

@ -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

View File

@ -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 \

View File

@ -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), \

View File

@ -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 $@ $<

View File

@ -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: $$@)

View File

@ -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] }

View File

@ -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
}