From 447414f00774d37d934867f5a476cf00e1f95423 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 5 Dec 2011 16:46:37 -0800 Subject: [PATCH] Establish 'core' library separate from 'std'. --- Makefile.in | 30 +++++++++++++++++++++++----- configure | 4 ++-- doc/lib.css | 8 ++++++++ doc/std.css | 8 -------- mk/dist.mk | 1 + mk/docs.mk | 32 ++++++++++++++++++------------ mk/host.mk | 16 +++++++++++++++ mk/install.mk | 2 ++ mk/pp.mk | 3 ++- mk/stage0.mk | 9 +++++++++ mk/target.mk | 7 +++++++ mk/tests.mk | 4 +++- mk/tools.mk | 3 +++ src/libcore/core.rc | 17 ++++++++++++++++ src/{lib => libstd}/bitv.rs | 0 src/{lib => libstd}/bool.rs | 0 src/{lib => libstd}/box.rs | 0 src/{lib => libstd}/c_vec.rs | 0 src/{lib => libstd}/char.rs | 0 src/{lib => libstd}/cmath.rs | 0 src/{lib => libstd}/comm.rs | 0 src/{lib => libstd}/ctypes.rs | 0 src/{lib => libstd}/dbg.rs | 0 src/{lib => libstd}/deque.rs | 0 src/{lib => libstd}/ebml.rs | 0 src/{lib => libstd}/either.rs | 0 src/{lib => libstd}/extfmt.rs | 0 src/{lib => libstd}/float.rs | 0 src/{lib => libstd}/four.rs | 0 src/{lib => libstd}/fs.rs | 0 src/{lib => libstd}/fun_treemap.rs | 0 src/{lib => libstd}/generic_os.rs | 0 src/{lib => libstd}/getopts.rs | 0 src/{lib => libstd}/int.rs | 0 src/{lib => libstd}/io.rs | 0 src/{lib => libstd}/json.rs | 0 src/{lib => libstd}/linux_os.rs | 0 src/{lib => libstd}/list.rs | 0 src/{lib => libstd}/macos_os.rs | 0 src/{lib => libstd}/map.rs | 0 src/{lib => libstd}/math.rs | 0 src/{lib => libstd}/math_f32.rs | 0 src/{lib => libstd}/math_f64.rs | 0 src/{lib => libstd}/net.rs | 0 src/{lib => libstd}/option.rs | 0 src/{lib => libstd}/posix_fs.rs | 0 src/{lib => libstd}/ptr.rs | 0 src/{lib => libstd}/rand.rs | 0 src/{lib => libstd}/result.rs | 0 src/{lib => libstd}/rope.rs | 0 src/{lib => libstd}/run_program.rs | 0 src/{lib => libstd}/sha1.rs | 0 src/{lib => libstd}/smallintmap.rs | 0 src/{lib => libstd}/sort.rs | 0 src/{lib => libstd}/std.rc | 0 src/{lib => libstd}/str.rs | 0 src/{lib => libstd}/sys.rs | 0 src/{lib => libstd}/task.rs | 0 src/{lib => libstd}/tempfile.rs | 0 src/{lib => libstd}/term.rs | 0 src/{lib => libstd}/test.rs | 0 src/{lib => libstd}/time.rs | 0 src/{lib => libstd}/treemap.rs | 0 src/{lib => libstd}/tri.rs | 0 src/{lib => libstd}/u32.rs | 0 src/{lib => libstd}/u64.rs | 0 src/{lib => libstd}/u8.rs | 0 src/{lib => libstd}/ufind.rs | 0 src/{lib => libstd}/uint.rs | 0 src/{lib => libstd}/unicode.rs | 0 src/{lib => libstd}/unsafe.rs | 0 src/{lib => libstd}/util.rs | 0 src/{lib => libstd}/uv.rs | 0 src/{lib => libstd}/vec.rs | 0 src/{lib => libstd}/win32_fs.rs | 0 src/{lib => libstd}/win32_os.rs | 0 76 files changed, 114 insertions(+), 30 deletions(-) create mode 100644 doc/lib.css delete mode 100644 doc/std.css create mode 100644 src/libcore/core.rc rename src/{lib => libstd}/bitv.rs (100%) rename src/{lib => libstd}/bool.rs (100%) rename src/{lib => libstd}/box.rs (100%) rename src/{lib => libstd}/c_vec.rs (100%) rename src/{lib => libstd}/char.rs (100%) rename src/{lib => libstd}/cmath.rs (100%) rename src/{lib => libstd}/comm.rs (100%) rename src/{lib => libstd}/ctypes.rs (100%) rename src/{lib => libstd}/dbg.rs (100%) rename src/{lib => libstd}/deque.rs (100%) rename src/{lib => libstd}/ebml.rs (100%) rename src/{lib => libstd}/either.rs (100%) rename src/{lib => libstd}/extfmt.rs (100%) rename src/{lib => libstd}/float.rs (100%) rename src/{lib => libstd}/four.rs (100%) rename src/{lib => libstd}/fs.rs (100%) rename src/{lib => libstd}/fun_treemap.rs (100%) rename src/{lib => libstd}/generic_os.rs (100%) rename src/{lib => libstd}/getopts.rs (100%) rename src/{lib => libstd}/int.rs (100%) rename src/{lib => libstd}/io.rs (100%) rename src/{lib => libstd}/json.rs (100%) rename src/{lib => libstd}/linux_os.rs (100%) rename src/{lib => libstd}/list.rs (100%) rename src/{lib => libstd}/macos_os.rs (100%) rename src/{lib => libstd}/map.rs (100%) rename src/{lib => libstd}/math.rs (100%) rename src/{lib => libstd}/math_f32.rs (100%) rename src/{lib => libstd}/math_f64.rs (100%) rename src/{lib => libstd}/net.rs (100%) rename src/{lib => libstd}/option.rs (100%) rename src/{lib => libstd}/posix_fs.rs (100%) rename src/{lib => libstd}/ptr.rs (100%) rename src/{lib => libstd}/rand.rs (100%) rename src/{lib => libstd}/result.rs (100%) rename src/{lib => libstd}/rope.rs (100%) rename src/{lib => libstd}/run_program.rs (100%) rename src/{lib => libstd}/sha1.rs (100%) rename src/{lib => libstd}/smallintmap.rs (100%) rename src/{lib => libstd}/sort.rs (100%) rename src/{lib => libstd}/std.rc (100%) rename src/{lib => libstd}/str.rs (100%) rename src/{lib => libstd}/sys.rs (100%) rename src/{lib => libstd}/task.rs (100%) rename src/{lib => libstd}/tempfile.rs (100%) rename src/{lib => libstd}/term.rs (100%) rename src/{lib => libstd}/test.rs (100%) rename src/{lib => libstd}/time.rs (100%) rename src/{lib => libstd}/treemap.rs (100%) rename src/{lib => libstd}/tri.rs (100%) rename src/{lib => libstd}/u32.rs (100%) rename src/{lib => libstd}/u64.rs (100%) rename src/{lib => libstd}/u8.rs (100%) rename src/{lib => libstd}/ufind.rs (100%) rename src/{lib => libstd}/uint.rs (100%) rename src/{lib => libstd}/unicode.rs (100%) rename src/{lib => libstd}/unsafe.rs (100%) rename src/{lib => libstd}/util.rs (100%) rename src/{lib => libstd}/uv.rs (100%) rename src/{lib => libstd}/vec.rs (100%) rename src/{lib => libstd}/win32_fs.rs (100%) rename src/{lib => libstd}/win32_os.rs (100%) diff --git a/Makefile.in b/Makefile.in index 52ab6d98eda..ec08f124b72 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,6 +104,7 @@ endif CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt) CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm) +CFG_CORELIB :=$(call CFG_LIB_NAME,core) CFG_STDLIB :=$(call CFG_LIB_NAME,ruststd) CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc) @@ -144,9 +145,9 @@ else endif ifeq ($(CFG_NATURALDOCS),) - $(info cfg: no naturaldocs found, omitting doc/std/index.html) + $(info cfg: no naturaldocs found, omitting library doc build) else - DOCS += doc/std/index.html + DOCS += doc/core/index.html doc/std/index.html endif ifdef CFG_DISABLE_DOCS @@ -183,12 +184,21 @@ GENERATED := %:: s.% %:: SCCS/s.% +###################################################################### +# Core library variables +###################################################################### + +CORELIB_CRATE := $(S)src/libcore/core.rc +CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \ + core.rc *.rs */*.rs)) + ###################################################################### # Standard library variables ###################################################################### -STDLIB_CRATE := $(S)src/lib/std.rc -STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/lib/,*.rc *.rs */*.rs)) +STDLIB_CRATE := $(S)src/libstd/std.rc +STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \ + std.rc *.rs */*.rs)) ###################################################################### # rustc crate variables @@ -268,13 +278,21 @@ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustc/$(2) TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib -# The name of the standard library used by rustc +# The name of the core and standard libraries used by rustc ifdef CFG_DISABLE_SHAREDSTD + HCORELIB_DEFAULT$(1)_H_$(3) = \ + $$(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 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) = \ @@ -286,6 +304,7 @@ HSREQ$(1)_H_$(3) = \ $$(HBIN$(1)_H_$(3))/rustc$$(X) \ $$(HLIB$(1)_H_$(3))/$$(CFG_RUNTIME) \ $$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \ + $$(HCORELIB_DEFAULT$(1)_H_$(3)) \ $$(HSTDLIB_DEFAULT$(1)_H_$(3)) \ $$(MKFILE_DEPS) @@ -299,6 +318,7 @@ TSREQ$(1)_T_$(2)_H_$(3) = \ # Prerequisites for complete stageN targets 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) ifeq ($(1),0) diff --git a/configure b/configure index d583e6a4b43..009e24059cf 100755 --- a/configure +++ b/configure @@ -355,8 +355,8 @@ fi step_msg "making directories" for i in \ - doc doc/std \ - nd nd/std \ + doc doc/core doc/std \ + nd nd/core nd/std \ dl tmp do make_dir $i diff --git a/doc/lib.css b/doc/lib.css new file mode 100644 index 00000000000..443f1180584 --- /dev/null +++ b/doc/lib.css @@ -0,0 +1,8 @@ +/* +Custom styles for the library docs generated by naturaldocs +*/ + +p { + text-indent: 0; + margin-bottom: 1em; + } diff --git a/doc/std.css b/doc/std.css deleted file mode 100644 index 9593f25e8f6..00000000000 --- a/doc/std.css +++ /dev/null @@ -1,8 +0,0 @@ -/* -Custom styles for the standard library docs generated by naturaldocs -*/ - -p { - text-indent: 0; - margin-bottom: 1em; - } \ No newline at end of file diff --git a/mk/dist.mk b/mk/dist.mk index 54fcfdeb013..a8df2c28fbe 100644 --- a/mk/dist.mk +++ b/mk/dist.mk @@ -46,6 +46,7 @@ PKG_FILES = \ $(PKG_3RDPARTY)) \ $(PKG_UV) \ $(COMPILER_INPUTS) \ + $(CORELIB_INPUTS) \ $(STDLIB_INPUTS) \ $(ALL_TEST_INPUTS) \ $(FUZZER_CRATE) \ diff --git a/mk/docs.mk b/mk/docs.mk index b4250194c48..4a5821ec2df 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -29,19 +29,25 @@ docsnap: doc/rust.pdf @$(call E, snap: doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf) $(Q)mv $< doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf -doc/std/index.html: nd/std/Languages.txt nd/std/Topics.txt nd/std/std.css \ - $(STDLIB_CRATE) $(STDLIB_INPUTS) - @$(call E, naturaldocs: $@) - naturaldocs -i $(S)src/lib -o HTML doc/std -p nd/std -r -s Default std +define libdoc +doc/$(1)/index.html: nd/$(1)/Languages.txt nd/$(1)/Topics.txt \ + nd/$(1)/lib.css $(2) + @$$(call E, naturaldocs: $$@) + naturaldocs -i $(S)src/lib$(1) -o HTML doc/$(1) -p nd/$(1) -r -s Default lib -nd/std/Languages.txt: $(S)doc/Languages.txt - @$(call E, cp: $@) - $(Q)cp $< $@ +nd/$(1)/Languages.txt: $(S)doc/Languages.txt + @$$(call E, cp: $$@) + $(Q)cp $$< $$@ -nd/std/Topics.txt: $(S)doc/Topics.txt - @$(call E, cp: $@) - $(Q)cp $< $@ +nd/$(1)/Topics.txt: $(S)doc/Topics.txt + @$$(call E, cp: $$@) + $(Q)cp $$< $$@ -nd/std/std.css: $(S)doc/std.css - @$(call E, cp: $@) - $(Q)cp $< $@ +nd/$(1)/lib.css: $(S)doc/lib.css + @$$(call E, cp: $$@) + $(Q)cp $$< $$@ + +endef + +$(eval $(call libdoc,core,$(CORELIB_CRATE) $(CORELIB_INPUTS))) +$(eval $(call libdoc,std,$(STDLIB_CRATE) $(STDLIB_INPUTS))) diff --git a/mk/host.mk b/mk/host.mk index eae38abc64f..add7278dee2 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -15,6 +15,7 @@ $$(HBIN$(2)_H_$(4))/rustc$$(X): \ $$(TBIN$(1)_T_$(4)_H_$(3))/rustc$$(X) \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \ + $$(HCORELIB_DEFAULT$(2)_H_$(4)) \ $$(HSTDLIB_DEFAULT$(2)_H_$(4)) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ @@ -25,6 +26,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \ + $$(HCORELIB_DEFAULT$(2)_H_$(3)) \ $$(HSTDLIB_DEFAULT$(2)_H_$(3)) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ @@ -34,14 +36,28 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ +$$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB): \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + $$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + +$$(HLIB$(2)_H_$(4))/libcore.rlib: \ + $$(TLIB$(1)_T_$(4)_H_$(3))/libcore.rlib \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ $$(HLIB$(2)_H_$(4))/libstd.rlib: \ $$(TLIB$(1)_T_$(4)_H_$(3))/libstd.rlib \ + $$(HLIB$(2)_H_$(4))/libcore.rlib \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ diff --git a/mk/install.mk b/mk/install.mk index fc69b7131d7..c22a4a37010 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -33,6 +33,7 @@ PTL$(1)$(2) = $$(PTR$(1)$(2))/lib install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(Q)mkdir -p $$(PTL$(1)$(2)) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME)) + $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_CORELIB)) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_STDLIB)) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),intrinsics.bc) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a) @@ -61,6 +62,7 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) $(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1 $(Q)$(call INSTALL,$(HB),$(PHB),rustc$(X)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME)) + $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_CORELIB)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_STDLIB)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM)) $(Q)$(call INSTALL,$(S)/man, \ diff --git a/mk/pp.mk b/mk/pp.mk index 7ee3cee8c41..df414901f7f 100644 --- a/mk/pp.mk +++ b/mk/pp.mk @@ -2,7 +2,8 @@ ifdef PPFILES PP_INPUTS_FILTERED := $(wildcard $(PPFILES)) else - PP_INPUTS = $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \ + PP_INPUTS = $(wildcard $(addprefix $(S)src/libcore/,*.rs */*.rs)) \ + $(wildcard $(addprefix $(S)src/libstd/,*.rs */*.rs)) \ $(wildcard $(addprefix $(S)src/comp/,*.rs */*.rs */*/*.rs)) \ $(wildcard $(S)src/test/*/*.rs \ $(S)src/test/*/*/*.rs) \ diff --git a/mk/stage0.mk b/mk/stage0.mk index a7e2341f654..7614c230406 100644 --- a/mk/stage0.mk +++ b/mk/stage0.mk @@ -13,6 +13,10 @@ $(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUNTIME): \ $(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X) $(Q)touch $@ +$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_CORELIB): \ + $(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X) + $(Q)touch $@ + $(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \ $(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X) $(Q)touch $@ @@ -38,6 +42,11 @@ $$(HLIB0_H_$(1))/$$(CFG_RUNTIME): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ +$$(HLIB0_H_$(1))/$(CFG_CORELIB): \ + $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_CORELIB) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + $$(HLIB0_H_$(1))/$(CFG_STDLIB): \ $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_STDLIB) @$$(call E, cp: $$@) diff --git a/mk/target.mk b/mk/target.mk index 5b91d70ae9a..ecedff1c5d1 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -22,8 +22,15 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ +$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB): \ + $$(CORELIB_CRATE) $$(CORELIB_INPUTS) \ + $$(TSREQ$(1)_T_$(2)_H_$(3)) + @$$(call E, compile_and_link: $$@) + $$(STAGE$(1)_T_$(2)_H_$(3)) --lib -o $$@ $$< + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB): \ $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \ $$(TSREQ$(1)_T_$(2)_H_$(3)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) --lib -o $$@ $$< diff --git a/mk/tests.mk b/mk/tests.mk index dbda3ecb5cb..e429c8ef98a 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -87,6 +87,8 @@ tidy: $(wildcard $(S)src/etc/*.py) \ $(COMPILER_CRATE) \ $(COMPILER_INPUTS) \ + $(CORELIB_CRATE) \ + $(CORELIB_INPUTS) \ $(STDLIB_CRATE) \ $(STDLIB_INPUTS) \ $(COMPILETEST_CRATE) \ @@ -475,4 +477,4 @@ endef $(foreach stage,$(STAGES), \ $(eval $(call DEF_CHECK_FOR_STAGE,$(stage)))) -check-fast: check-fast-H-$(CFG_HOST_TRIPLE) \ No newline at end of file +check-fast: check-fast-H-$(CFG_HOST_TRIPLE) diff --git a/mk/tools.mk b/mk/tools.mk index 3a944f76f32..84d7c55ac35 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -19,6 +19,7 @@ define TOOLS_STAGE_N $$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X): \ $$(FUZZER_CRATE) $$(FUZZER_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) @$$(call E, compile_and_link: $$@) @@ -37,6 +38,7 @@ $$(HBIN$(2)_H_$(4))/fuzzer$$(X): \ $$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X): \ $$(COMPILETEST_CRATE) $$(COMPILETEST_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< @@ -50,6 +52,7 @@ $$(HBIN$(2)_H_$(4))/compiletest$$(X): \ $$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X): \ $$(CARGO_CRATE) $$(CARGO_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) @$$(call E, compile_and_link: $$@) diff --git a/src/libcore/core.rc b/src/libcore/core.rc new file mode 100644 index 00000000000..6feaf8fbfab --- /dev/null +++ b/src/libcore/core.rc @@ -0,0 +1,17 @@ +#[link(name = "core", + vers = "0.1", + uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8", + url = "http://rust-lang.org/src/core")]; + +#[comment = "The Rust core library"]; +#[license = "BSD"]; + + +// Local Variables: +// mode: rust; +// fill-column: 78; +// indent-tabs-mode: nil +// c-basic-offset: 4 +// buffer-file-coding-system: utf-8-unix +// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'"; +// End: diff --git a/src/lib/bitv.rs b/src/libstd/bitv.rs similarity index 100% rename from src/lib/bitv.rs rename to src/libstd/bitv.rs diff --git a/src/lib/bool.rs b/src/libstd/bool.rs similarity index 100% rename from src/lib/bool.rs rename to src/libstd/bool.rs diff --git a/src/lib/box.rs b/src/libstd/box.rs similarity index 100% rename from src/lib/box.rs rename to src/libstd/box.rs diff --git a/src/lib/c_vec.rs b/src/libstd/c_vec.rs similarity index 100% rename from src/lib/c_vec.rs rename to src/libstd/c_vec.rs diff --git a/src/lib/char.rs b/src/libstd/char.rs similarity index 100% rename from src/lib/char.rs rename to src/libstd/char.rs diff --git a/src/lib/cmath.rs b/src/libstd/cmath.rs similarity index 100% rename from src/lib/cmath.rs rename to src/libstd/cmath.rs diff --git a/src/lib/comm.rs b/src/libstd/comm.rs similarity index 100% rename from src/lib/comm.rs rename to src/libstd/comm.rs diff --git a/src/lib/ctypes.rs b/src/libstd/ctypes.rs similarity index 100% rename from src/lib/ctypes.rs rename to src/libstd/ctypes.rs diff --git a/src/lib/dbg.rs b/src/libstd/dbg.rs similarity index 100% rename from src/lib/dbg.rs rename to src/libstd/dbg.rs diff --git a/src/lib/deque.rs b/src/libstd/deque.rs similarity index 100% rename from src/lib/deque.rs rename to src/libstd/deque.rs diff --git a/src/lib/ebml.rs b/src/libstd/ebml.rs similarity index 100% rename from src/lib/ebml.rs rename to src/libstd/ebml.rs diff --git a/src/lib/either.rs b/src/libstd/either.rs similarity index 100% rename from src/lib/either.rs rename to src/libstd/either.rs diff --git a/src/lib/extfmt.rs b/src/libstd/extfmt.rs similarity index 100% rename from src/lib/extfmt.rs rename to src/libstd/extfmt.rs diff --git a/src/lib/float.rs b/src/libstd/float.rs similarity index 100% rename from src/lib/float.rs rename to src/libstd/float.rs diff --git a/src/lib/four.rs b/src/libstd/four.rs similarity index 100% rename from src/lib/four.rs rename to src/libstd/four.rs diff --git a/src/lib/fs.rs b/src/libstd/fs.rs similarity index 100% rename from src/lib/fs.rs rename to src/libstd/fs.rs diff --git a/src/lib/fun_treemap.rs b/src/libstd/fun_treemap.rs similarity index 100% rename from src/lib/fun_treemap.rs rename to src/libstd/fun_treemap.rs diff --git a/src/lib/generic_os.rs b/src/libstd/generic_os.rs similarity index 100% rename from src/lib/generic_os.rs rename to src/libstd/generic_os.rs diff --git a/src/lib/getopts.rs b/src/libstd/getopts.rs similarity index 100% rename from src/lib/getopts.rs rename to src/libstd/getopts.rs diff --git a/src/lib/int.rs b/src/libstd/int.rs similarity index 100% rename from src/lib/int.rs rename to src/libstd/int.rs diff --git a/src/lib/io.rs b/src/libstd/io.rs similarity index 100% rename from src/lib/io.rs rename to src/libstd/io.rs diff --git a/src/lib/json.rs b/src/libstd/json.rs similarity index 100% rename from src/lib/json.rs rename to src/libstd/json.rs diff --git a/src/lib/linux_os.rs b/src/libstd/linux_os.rs similarity index 100% rename from src/lib/linux_os.rs rename to src/libstd/linux_os.rs diff --git a/src/lib/list.rs b/src/libstd/list.rs similarity index 100% rename from src/lib/list.rs rename to src/libstd/list.rs diff --git a/src/lib/macos_os.rs b/src/libstd/macos_os.rs similarity index 100% rename from src/lib/macos_os.rs rename to src/libstd/macos_os.rs diff --git a/src/lib/map.rs b/src/libstd/map.rs similarity index 100% rename from src/lib/map.rs rename to src/libstd/map.rs diff --git a/src/lib/math.rs b/src/libstd/math.rs similarity index 100% rename from src/lib/math.rs rename to src/libstd/math.rs diff --git a/src/lib/math_f32.rs b/src/libstd/math_f32.rs similarity index 100% rename from src/lib/math_f32.rs rename to src/libstd/math_f32.rs diff --git a/src/lib/math_f64.rs b/src/libstd/math_f64.rs similarity index 100% rename from src/lib/math_f64.rs rename to src/libstd/math_f64.rs diff --git a/src/lib/net.rs b/src/libstd/net.rs similarity index 100% rename from src/lib/net.rs rename to src/libstd/net.rs diff --git a/src/lib/option.rs b/src/libstd/option.rs similarity index 100% rename from src/lib/option.rs rename to src/libstd/option.rs diff --git a/src/lib/posix_fs.rs b/src/libstd/posix_fs.rs similarity index 100% rename from src/lib/posix_fs.rs rename to src/libstd/posix_fs.rs diff --git a/src/lib/ptr.rs b/src/libstd/ptr.rs similarity index 100% rename from src/lib/ptr.rs rename to src/libstd/ptr.rs diff --git a/src/lib/rand.rs b/src/libstd/rand.rs similarity index 100% rename from src/lib/rand.rs rename to src/libstd/rand.rs diff --git a/src/lib/result.rs b/src/libstd/result.rs similarity index 100% rename from src/lib/result.rs rename to src/libstd/result.rs diff --git a/src/lib/rope.rs b/src/libstd/rope.rs similarity index 100% rename from src/lib/rope.rs rename to src/libstd/rope.rs diff --git a/src/lib/run_program.rs b/src/libstd/run_program.rs similarity index 100% rename from src/lib/run_program.rs rename to src/libstd/run_program.rs diff --git a/src/lib/sha1.rs b/src/libstd/sha1.rs similarity index 100% rename from src/lib/sha1.rs rename to src/libstd/sha1.rs diff --git a/src/lib/smallintmap.rs b/src/libstd/smallintmap.rs similarity index 100% rename from src/lib/smallintmap.rs rename to src/libstd/smallintmap.rs diff --git a/src/lib/sort.rs b/src/libstd/sort.rs similarity index 100% rename from src/lib/sort.rs rename to src/libstd/sort.rs diff --git a/src/lib/std.rc b/src/libstd/std.rc similarity index 100% rename from src/lib/std.rc rename to src/libstd/std.rc diff --git a/src/lib/str.rs b/src/libstd/str.rs similarity index 100% rename from src/lib/str.rs rename to src/libstd/str.rs diff --git a/src/lib/sys.rs b/src/libstd/sys.rs similarity index 100% rename from src/lib/sys.rs rename to src/libstd/sys.rs diff --git a/src/lib/task.rs b/src/libstd/task.rs similarity index 100% rename from src/lib/task.rs rename to src/libstd/task.rs diff --git a/src/lib/tempfile.rs b/src/libstd/tempfile.rs similarity index 100% rename from src/lib/tempfile.rs rename to src/libstd/tempfile.rs diff --git a/src/lib/term.rs b/src/libstd/term.rs similarity index 100% rename from src/lib/term.rs rename to src/libstd/term.rs diff --git a/src/lib/test.rs b/src/libstd/test.rs similarity index 100% rename from src/lib/test.rs rename to src/libstd/test.rs diff --git a/src/lib/time.rs b/src/libstd/time.rs similarity index 100% rename from src/lib/time.rs rename to src/libstd/time.rs diff --git a/src/lib/treemap.rs b/src/libstd/treemap.rs similarity index 100% rename from src/lib/treemap.rs rename to src/libstd/treemap.rs diff --git a/src/lib/tri.rs b/src/libstd/tri.rs similarity index 100% rename from src/lib/tri.rs rename to src/libstd/tri.rs diff --git a/src/lib/u32.rs b/src/libstd/u32.rs similarity index 100% rename from src/lib/u32.rs rename to src/libstd/u32.rs diff --git a/src/lib/u64.rs b/src/libstd/u64.rs similarity index 100% rename from src/lib/u64.rs rename to src/libstd/u64.rs diff --git a/src/lib/u8.rs b/src/libstd/u8.rs similarity index 100% rename from src/lib/u8.rs rename to src/libstd/u8.rs diff --git a/src/lib/ufind.rs b/src/libstd/ufind.rs similarity index 100% rename from src/lib/ufind.rs rename to src/libstd/ufind.rs diff --git a/src/lib/uint.rs b/src/libstd/uint.rs similarity index 100% rename from src/lib/uint.rs rename to src/libstd/uint.rs diff --git a/src/lib/unicode.rs b/src/libstd/unicode.rs similarity index 100% rename from src/lib/unicode.rs rename to src/libstd/unicode.rs diff --git a/src/lib/unsafe.rs b/src/libstd/unsafe.rs similarity index 100% rename from src/lib/unsafe.rs rename to src/libstd/unsafe.rs diff --git a/src/lib/util.rs b/src/libstd/util.rs similarity index 100% rename from src/lib/util.rs rename to src/libstd/util.rs diff --git a/src/lib/uv.rs b/src/libstd/uv.rs similarity index 100% rename from src/lib/uv.rs rename to src/libstd/uv.rs diff --git a/src/lib/vec.rs b/src/libstd/vec.rs similarity index 100% rename from src/lib/vec.rs rename to src/libstd/vec.rs diff --git a/src/lib/win32_fs.rs b/src/libstd/win32_fs.rs similarity index 100% rename from src/lib/win32_fs.rs rename to src/libstd/win32_fs.rs diff --git a/src/lib/win32_os.rs b/src/libstd/win32_os.rs similarity index 100% rename from src/lib/win32_os.rs rename to src/libstd/win32_os.rs