about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-30 20:05:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-07 08:12:48 -0700
commit836d4b96a91cd6a36228d757004655e26e3f2c46 (patch)
tree6f27be6e6380438edbb3d0c1359a3f1b0f4c1b05
parentef6daf9935da103f1b915a5c9904794da79b0b60 (diff)
mk: Add libcore
-rw-r--r--mk/crates.mk7
-rw-r--r--mk/host.mk8
-rw-r--r--src/libcore/lib.rs22
3 files changed, 32 insertions, 5 deletions
diff --git a/mk/crates.mk b/mk/crates.mk
index 44d46fe73d9..9da80c2bc11 100644
--- a/mk/crates.mk
+++ b/mk/crates.mk
@@ -51,12 +51,13 @@
 
 TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
                  uuid serialize sync getopts collections num test time rand \
-		 workcache url log regex graphviz
+		 workcache url log regex graphviz core
 HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
 CRATES := $(TARGET_CRATES) $(HOST_CRATES)
 TOOLS := compiletest rustdoc rustc
 
-DEPS_std := libc native:rustrt native:compiler-rt native:backtrace
+DEPS_core :=
+DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace
 DEPS_green := std rand native:context_switch
 DEPS_rustuv := std native:uv native:uv_support
 DEPS_native := std
@@ -95,6 +96,8 @@ TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
 TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
 TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
 
+ONLY_RLIB_core := 1
+
 ################################################################################
 # You should not need to edit below this line
 ################################################################################
diff --git a/mk/host.mk b/mk/host.mk
index 7a3664d897d..ea2ac7a1140 100644
--- a/mk/host.mk
+++ b/mk/host.mk
@@ -18,6 +18,7 @@
 # $(5) - the name of the crate being processed
 define CP_HOST_STAGE_N_CRATE
 
+ifeq ($$(ONLY_RLIB_$(5)),)
 $$(HLIB$(2)_H_$(4))/stamp.$(5):					\
 	$$(TLIB$(1)_T_$(3)_H_$(4))/stamp.$(5)			\
 	$$(RUST_DEPS_$(5):%=$$(HLIB$(2)_H_$(4))/stamp.%)	\
@@ -30,6 +31,10 @@ $$(HLIB$(2)_H_$(4))/stamp.$(5):					\
 	        $$(HLIB$(2)_H_$(4))
 	$$(call LIST_ALL_OLD_GLOB_MATCHES,\
 	    $$(dir $$@)$$(call CFG_LIB_GLOB_$(3),$(5)))
+else
+$$(HLIB$(2)_H_$(4))/stamp.$(5):
+	$$(Q)touch $$@
+endif
 
 endef
 
@@ -54,9 +59,6 @@ endef
 # $(4) - the host triple (same as $(3))
 define CP_HOST_STAGE_N
 
-$$(HBIN$(2)_H_$(4))/:
-	@mkdir -p $$@
-
 ifneq ($(CFG_LIBDIR_RELATIVE),bin)
 $$(HLIB$(2)_H_$(4))/:
 	@mkdir -p $$@
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
new file mode 100644
index 00000000000..5d9476f95e3
--- /dev/null
+++ b/src/libcore/lib.rs
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The Rust core library
+
+#![crate_id = "core#0.11-pre"]
+#![license = "MIT/ASL2"]
+#![crate_type = "rlib"]
+#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
+       html_root_url = "http://static.rust-lang.org/doc/master")]
+
+#![no_std]
+#![feature(globs, macro_rules, managed_boxes)]
+#![deny(missing_doc)]