diff --git a/Makefile.in b/Makefile.in index d32e6116eff..629b4426c2c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -289,19 +289,31 @@ ifdef CFG_DISABLE_SHAREDSTD $$(HLIB$(1)_H_$(3))/libcore.rlib TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/libcore.rlib + HSTDLIB_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/libstd.rlib TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib + + HLIBRUSTC_DEFAULT$(1)_H_$(3) = \ + $$(HLIB$(1)_H_$(3))/librustc.rlib + TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \ + $$(TLIB$(1)_T_$(2)_H_$(3))/librustc.rlib else HCORELIB_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$(CFG_CORELIB) TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB) + HSTDLIB_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$(CFG_STDLIB) TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB) + + HLIBRUSTC_DEFAULT$(1)_H_$(3) = \ + $$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC) + TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC) endif # Preqrequisites for using the stageN compiler @@ -311,6 +323,7 @@ HSREQ$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \ $$(HCORELIB_DEFAULT$(1)_H_$(3)) \ $$(HSTDLIB_DEFAULT$(1)_H_$(3)) \ + $$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \ $$(MKFILE_DEPS) # Prerequisites for using the stageN compiler to build target artifacts @@ -324,7 +337,8 @@ TSREQ$(1)_T_$(2)_H_$(3) = \ SREQ$(1)_T_$(2)_H_$(3) = \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) ifeq ($(1),0) # Don't run the the stage0 compiler under valgrind - that ship has sailed diff --git a/mk/host.mk b/mk/host.mk index 475fa8085a6..a23af108f43 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -68,6 +68,14 @@ $$(HLIB$(2)_H_$(4))/libstd.rlib: \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ +$$(HLIB$(2)_H_$(4))/librustc.rlib: \ + $$(TLIB$(1)_T_$(4)_H_$(3))/librustc.rlib \ + $$(HLIB$(2)_H_$(4))/libcore.rlib \ + $$(HLIB$(2)_H_$(4))/libstd.rlib \ + $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + $$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_RUSTLLVM) @$$(call E, cp: $$@) diff --git a/mk/install.mk b/mk/install.mk index e0e32769629..7d89f82c019 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -40,6 +40,8 @@ install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CORELIB_GLOB)) $$(Q)$$(call INSTALL_LIB, \ $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(STDLIB_GLOB)) + $$(Q)$$(call INSTALL_LIB, \ + $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTC_GLOB)) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),intrinsics.bc) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a) endef @@ -69,6 +71,7 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME)) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB)) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB)) + $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTC_GLOB)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM)) $(Q)$(call INSTALL,$(S)/man, \ $(PREFIX_ROOT)/share/man/man1,rustc.1) diff --git a/mk/stage0.mk b/mk/stage0.mk index e203d9df28d..66dafc92be7 100644 --- a/mk/stage0.mk +++ b/mk/stage0.mk @@ -21,6 +21,10 @@ $(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \ $(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X) $(Q)touch $@ +$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_LIBRUSTC): \ + $(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X) + $(Q)touch $@ + $(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUSTLLVM): \ $(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X) $(Q)touch $@ @@ -52,6 +56,11 @@ $$(HLIB0_H_$(1))/$(CFG_STDLIB): \ @$$(call E, cp: $$@) $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(STDLIB_GLOB) $$@ +$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC): \ + $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_LIBRUSTC) + @$$(call E, cp: $$@) + $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(LIBRUSTC_GLOB) $$@ + $$(HLIB0_H_$(1))/$(CFG_RUSTLLVM): \ $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUSTLLVM) @$$(call E, cp: $$@) diff --git a/mk/target.mk b/mk/target.mk index 4df1d6dd392..381c3af640b 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -49,7 +49,9 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \ $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \ - $$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3)) + $$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ + $$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ + $$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< @@ -57,6 +59,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC): \ $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \ + $$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ $$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) --lib -o $$@ $$< && touch $$@ diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py index 07af0202bfc..130304fdab8 100644 --- a/src/etc/snapshot.py +++ b/src/etc/snapshot.py @@ -19,16 +19,19 @@ snapshot_files = { "linux": ["bin/rustc", "lib/libcore-*.so", "lib/libstd-*.so", + "lib/librustc-*.so", "lib/librustrt.so", "lib/librustllvm.so"], "macos": ["bin/rustc", "lib/libcore-*.dylib", "lib/libstd-*.dylib", + "lib/librustc-*.dylib", "lib/librustrt.dylib", "lib/librustllvm.dylib"], "winnt": ["bin/rustc.exe", "lib/core-*.dll", "lib/std-*.dll", + "lib/rustc-*.dll", "lib/rustrt.dll", "lib/rustllvm.dll"] }