mk: Add libcore

This commit is contained in:
Alex Crichton 2014-04-30 20:05:14 -07:00
parent ef6daf9935
commit 836d4b96a9
3 changed files with 32 additions and 5 deletions

View File

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

View File

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

22
src/libcore/lib.rs Normal file
View File

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