Skip to content

Commit 836d4b9

Browse files
committed
mk: Add libcore
1 parent ef6daf9 commit 836d4b9

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

mk/crates.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz
54+
workcache url log regex graphviz core
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

59-
DEPS_std := libc native:rustrt native:compiler-rt native:backtrace
59+
DEPS_core :=
60+
DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace
6061
DEPS_green := std rand native:context_switch
6162
DEPS_rustuv := std native:uv native:uv_support
6263
DEPS_native := std
@@ -95,6 +96,8 @@ TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
9596
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
9697
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
9798

99+
ONLY_RLIB_core := 1
100+
98101
################################################################################
99102
# You should not need to edit below this line
100103
################################################################################

mk/host.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# $(5) - the name of the crate being processed
1919
define CP_HOST_STAGE_N_CRATE
2020

21+
ifeq ($$(ONLY_RLIB_$(5)),)
2122
$$(HLIB$(2)_H_$(4))/stamp.$(5): \
2223
$$(TLIB$(1)_T_$(3)_H_$(4))/stamp.$(5) \
2324
$$(RUST_DEPS_$(5):%=$$(HLIB$(2)_H_$(4))/stamp.%) \
@@ -30,6 +31,10 @@ $$(HLIB$(2)_H_$(4))/stamp.$(5): \
3031
$$(HLIB$(2)_H_$(4))
3132
$$(call LIST_ALL_OLD_GLOB_MATCHES,\
3233
$$(dir $$@)$$(call CFG_LIB_GLOB_$(3),$(5)))
34+
else
35+
$$(HLIB$(2)_H_$(4))/stamp.$(5):
36+
$$(Q)touch $$@
37+
endif
3338

3439
endef
3540

@@ -54,9 +59,6 @@ endef
5459
# $(4) - the host triple (same as $(3))
5560
define CP_HOST_STAGE_N
5661

57-
$$(HBIN$(2)_H_$(4))/:
58-
@mkdir -p $$@
59-
6062
ifneq ($(CFG_LIBDIR_RELATIVE),bin)
6163
$$(HLIB$(2)_H_$(4))/:
6264
@mkdir -p $$@

src/libcore/lib.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! The Rust core library
12+
13+
#![crate_id = "core#0.11-pre"]
14+
#![license = "MIT/ASL2"]
15+
#![crate_type = "rlib"]
16+
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
17+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
18+
html_root_url = "http://static.rust-lang.org/doc/master")]
19+
20+
#![no_std]
21+
#![feature(globs, macro_rules, managed_boxes)]
22+
#![deny(missing_doc)]

0 commit comments

Comments
 (0)