Permalink
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Open a pull request
- 6 commits
- 269 files changed
- 0 commit comments
- 1 contributor
Unified
Split
Showing
with
9,738 additions
and 4,129 deletions.
- +2 −0 .gitignore
- +33 −0 Cargo.toml
- +56 −0 cargobuild
- +28 −0 rustc-sysroot
- +8 −0 src/compiletest/Cargo.toml
- +11 −0 src/error-index-generator/Cargo.toml
- +11 −0 src/liballoc/Cargo.toml
- +17 −0 src/liballoc_jemalloc/Cargo.toml
- +40 −0 src/liballoc_jemalloc/build.rs
- +12 −0 src/liballoc_system/Cargo.toml
- +8 −0 src/libarena/Cargo.toml
- +13 −0 src/libcollections/Cargo.toml
- +12 −0 src/libcollectionstest/Cargo.toml
- +1 −0 src/libcollectionstest/btree/map.rs
- +8 −0 src/libcore/Cargo.toml
- +1 −0 src/libcore/lib.rs
- +4 −6 src/libcore/macros.rs
- +231 −0 src/libcore/time/duration.rs
- +17 −0 src/libcore/time/mod.rs
- +11 −0 src/libcoretest/Cargo.toml
- +13 −0 src/libflate/Cargo.toml
- +9 −0 src/libflate/build.rs
- +8 −0 src/libfmt_macros/Cargo.toml
- +8 −0 src/libgetopts/Cargo.toml
- +8 −0 src/libgraphviz/Cargo.toml
- +11 −0 src/liblibc/Cargo.toml
- +140 −1 src/liblibc/lib.rs
- +8 −0 src/liblog/Cargo.toml
- +11 −0 src/librand/Cargo.toml
- +12 −0 src/librbml/Cargo.toml
- +14 −0 src/librustc/Cargo.toml
- +1 −1 src/librustc/lib.rs
- +2 −2 src/librustc/metadata/loader.rs
- +4 −3 src/librustc/session/config.rs
- +2 −2 src/librustc/util/common.rs
- +12 −0 src/librustc_back/Cargo.toml
- +4 −0 src/librustc_back/target/mod.rs
- +11 −0 src/librustc_bitflags/Cargo.toml
- +12 −0 src/librustc_borrowck/Cargo.toml
- +8 −0 src/librustc_data_structures/Cargo.toml
- +26 −0 src/librustc_driver/Cargo.toml
- +3 −0 src/librustc_driver/build.rs
- +8 −0 src/librustc_front/Cargo.toml
- +12 −0 src/librustc_lint/Cargo.toml
- +12 −0 src/librustc_llvm/Cargo.toml
- +48 −0 src/librustc_llvm/build.rs
- +13 −0 src/librustc_mir/Cargo.toml
- +12 −0 src/librustc_platform_intrinsics/Cargo.toml
- +12 −0 src/librustc_privacy/Cargo.toml
- +12 −0 src/librustc_resolve/Cargo.toml
- +15 −0 src/librustc_trans/Cargo.toml
- +13 −0 src/librustc_typeck/Cargo.toml
- +11 −0 src/librustc_unicode/Cargo.toml
- +24 −0 src/librustdoc/Cargo.toml
- +19 −0 src/librustdoc/build.rs
- +11 −0 src/libserialize/Cargo.toml
- +26 −0 src/libstd/Cargo.toml
- +79 −0 src/libstd/conv.rs
- +14 −224 src/libstd/dynamic_lib.rs
- +46 −175 src/libstd/env.rs
- +5 −4 src/libstd/ffi/c_str.rs
- +14 −26 src/libstd/ffi/os_str.rs
- +94 −68 src/libstd/fs.rs
- +37 −15 src/libstd/io/error.rs
- +2 −2 src/libstd/io/lazy.rs
- +15 −0 src/libstd/io/mod.rs
- +11 −10 src/libstd/{sys/common/io.rs → io/read_uninitialized.rs}
- +21 −42 src/libstd/io/stdio.rs
- +44 −16 src/libstd/lib.rs
- +47 −55 src/libstd/net/addr.rs
- +48 −40 src/libstd/net/ip.rs
- +19 −22 src/libstd/net/mod.rs
- +69 −45 src/libstd/net/tcp.rs
- +37 −24 src/libstd/net/udp.rs
- +3 −3 src/libstd/num/f32.rs
- +2 −2 src/libstd/num/f64.rs
- +5 −4 src/libstd/{sys/unix/ext → os/unix}/ffi.rs
- +260 −0 src/libstd/os/unix/fs.rs
- +15 −16 src/libstd/{sys/unix/ext → os/unix}/io.rs
- +53 −0 src/libstd/os/unix/mod.rs
- +13 −13 src/libstd/{sys/unix/ext → os/unix}/process.rs
- 0 src/libstd/{sys/windows/ext → os/windows}/ffi.rs
- 0 src/libstd/{sys/windows/ext → os/windows}/fs.rs
- 0 src/libstd/{sys/windows/ext → os/windows}/io.rs
- 0 src/libstd/{sys/windows/ext → os/windows}/mod.rs
- 0 src/libstd/{sys/windows/ext → os/windows}/process.rs
- 0 src/libstd/{sys/windows/ext → os/windows}/raw.rs
- +28 −138 src/libstd/path.rs
- +86 −133 src/libstd/process.rs
- +4 −2 src/libstd/rand/mod.rs
- +2 −331 src/libstd/rand/os.rs
- +0 −65 src/libstd/rt.rs
- +6 −2 src/libstd/{sys/common/at_exit_imp.rs → rt/at_exit.rs}
- +29 −39 src/libstd/{sys/common → rt}/backtrace.rs
- +30 −0 src/libstd/rt/mod.rs
- +37 −32 src/libstd/{ → rt}/panicking.rs
- +17 −16 src/libstd/sync/condvar.rs
- +4 −2 src/libstd/sync/mod.rs
- +4 −2 src/libstd/sync/mutex.rs
- +3 −3 src/libstd/{sys/common → sync}/poison.rs
- +6 −4 src/libstd/{sys/common → sync}/remutex.rs
- +6 −4 src/libstd/sync/rwlock.rs
- +0 −441 src/libstd/sys/common/net.rs
- +0 −24 src/libstd/sys/common/thread.rs
- +0 −62 src/libstd/sys/common/thread_info.rs
- +0 −271 src/libstd/sys/common/thread_local.rs
- +0 −46 src/libstd/sys/common/util.rs
- +0 −75 src/libstd/sys/unix/fd.rs
- +0 −505 src/libstd/sys/unix/os.rs
- +0 −60 src/libstd/sys/unix/stdio.rs
- +27 −0 src/libstd/thread/info.rs
- +10 −246 src/libstd/thread/local.rs
- +36 −30 src/libstd/thread/mod.rs
- +1 −17 src/libstd/thread/scoped_tls.rs
- +33 −0 src/libstd/thread/start.rs
- +3 −3 src/libstd/time/duration.rs
- +15 −2 src/libstd/time/mod.rs
- +14 −0 src/libsyntax/Cargo.toml
- +24 −0 src/libsystem/Cargo.toml
- +27 −0 src/libsystem/backtrace.rs
- +1,268 −0 src/libsystem/bind.rs
- +8 −0 src/libsystem/c.rs
- +148 −0 src/libsystem/c_str.rs
- +19 −13 src/{libstd/sys → libsystem}/common/args.rs
- +21 −0 src/libsystem/common/backtrace.rs
- +6 −0 src/libsystem/common/c.rs
- 0 src/{libstd/sys → libsystem}/common/condvar.rs
- 0 src/{libstd/sys → libsystem}/common/dwarf/eh.rs
- 0 src/{libstd/sys → libsystem}/common/dwarf/mod.rs
- +14 −17 src/{libstd/sys → libsystem}/common/gnu/libbacktrace.rs
- 0 src/{libstd/sys → libsystem}/common/gnu/mod.rs
- 0 src/{libstd/sys → libsystem}/common/libunwind.rs
- +18 −0 src/{libstd/sys → libsystem}/common/mod.rs
- 0 src/{libstd/sys → libsystem}/common/mutex.rs
- +139 −0 src/libsystem/common/net/addr.rs
- +128 −0 src/libsystem/common/net/ip.rs
- +353 −0 src/libsystem/common/net/mod.rs
- +28 −0 src/libsystem/common/once.rs
- +45 −0 src/libsystem/common/rt.rs
- 0 src/{libstd/sys → libsystem}/common/rwlock.rs
- +426 −0 src/libsystem/common/thread_local.rs
- +7 −7 src/{libstd/sys → libsystem}/common/unwind/gcc.rs
- +58 −27 src/{libstd/sys → libsystem}/common/unwind/mod.rs
- 0 src/{libstd/sys → libsystem}/common/unwind/seh.rs
- 0 src/{libstd/sys → libsystem}/common/unwind/seh64_gnu.rs
- +56 −0 src/libsystem/deps.rs
- +13 −0 src/libsystem/deps/backtrace/Cargo.toml
- +45 −0 src/libsystem/deps/backtrace/build.rs
- +5 −0 src/libsystem/deps/backtrace/lib.rs
- +13 −0 src/libsystem/deps/compiler-rt/Cargo.toml
- +36 −0 src/libsystem/deps/compiler-rt/build.rs
- +5 −0 src/libsystem/deps/compiler-rt/lib.rs
- 0 src/libsystem/deps/dummy.rs
- +13 −0 src/libsystem/deps/rust_builtin/Cargo.toml
- +10 −0 src/libsystem/deps/rust_builtin/build.rs
- +5 −0 src/libsystem/deps/rust_builtin/lib.rs
- +1 −0 src/libsystem/deps/rust_builtin/rust_android_dummy.c
- +1 −0 src/libsystem/deps/rust_builtin/rust_android_dummy.h
- +1 −0 src/libsystem/deps/rust_builtin/rust_builtin.c
- +26 −0 src/libsystem/dynamic_lib.rs
- +108 −0 src/libsystem/env.rs
- +49 −0 src/libsystem/error.rs
- +115 −0 src/libsystem/fs.rs
- +135 −0 src/libsystem/inner.rs
- +48 −0 src/libsystem/io.rs
- +243 −0 src/libsystem/lib.rs
- +150 −0 src/libsystem/net.rs
- +20 −0 src/libsystem/none.rs
- 0 src/{libstd → libsystem}/os/android/mod.rs
- 0 src/{libstd → libsystem}/os/android/raw.rs
- 0 src/{libstd → libsystem}/os/bitrig/mod.rs
- 0 src/{libstd → libsystem}/os/bitrig/raw.rs
- 0 src/{libstd → libsystem}/os/dragonfly/mod.rs
- 0 src/{libstd → libsystem}/os/dragonfly/raw.rs
- 0 src/{libstd → libsystem}/os/freebsd/mod.rs
- 0 src/{libstd → libsystem}/os/freebsd/raw.rs
- 0 src/{libstd → libsystem}/os/ios/mod.rs
- 0 src/{libstd → libsystem}/os/ios/raw.rs
- +1 −1 src/{libstd → libsystem}/os/linux/mod.rs
- +4 −4 src/{libstd → libsystem}/os/linux/raw.rs
- 0 src/{libstd → libsystem}/os/macos/mod.rs
- 0 src/{libstd → libsystem}/os/macos/raw.rs
- +1 −4 src/{libstd → libsystem}/os/mod.rs
- 0 src/{libstd → libsystem}/os/nacl/mod.rs
- 0 src/{libstd → libsystem}/os/nacl/raw.rs
- 0 src/{libstd → libsystem}/os/netbsd/mod.rs
- 0 src/{libstd → libsystem}/os/netbsd/raw.rs
- 0 src/{libstd → libsystem}/os/openbsd/mod.rs
- 0 src/{libstd → libsystem}/os/openbsd/raw.rs
- +8 −4 src/{libstd → libsystem}/os/raw.rs
- +271 −0 src/libsystem/os_str.rs
- +33 −0 src/libsystem/path.rs
- +78 −0 src/libsystem/process.rs
- +17 −0 src/libsystem/rand.rs
- +24 −0 src/libsystem/rt.rs
- +10 −0 src/libsystem/stack_overflow.rs
- +40 −0 src/libsystem/stdio.rs
- +82 −0 src/libsystem/sync.rs
- +77 −0 src/libsystem/thread.rs
- +99 −0 src/libsystem/thread_local.rs
- +15 −0 src/libsystem/time.rs
- +19 −0 src/{libstd/sys → libsystem}/unix/backtrace/mod.rs
- 0 src/{libstd/sys → libsystem}/unix/backtrace/printing/dladdr.rs
- +1 −1 src/{libstd/sys → libsystem}/unix/backtrace/printing/gnu.rs
- 0 src/{libstd/sys → libsystem}/unix/backtrace/printing/mod.rs
- 0 src/{libstd/sys → libsystem}/unix/backtrace/tracing/backtrace_fn.rs
- +16 −22 src/{libstd/sys → libsystem}/unix/backtrace/tracing/gcc_s.rs
- 0 src/{libstd/sys → libsystem}/unix/backtrace/tracing/mod.rs
- 0 src/{libstd/sys → libsystem}/unix/c.rs
- +23 −19 src/{libstd/sys → libsystem}/unix/condvar.rs
- +1 −1 src/{libstd/rtdeps.rs → libsystem/unix/deps.rs}
- +96 −0 src/libsystem/unix/dynamic_lib.rs
- +541 −0 src/libsystem/unix/env.rs
- +122 −0 src/libsystem/unix/error.rs
- +39 −0 src/libsystem/unix/ext/ffi.rs
- +2 −35 src/{libstd/sys → libsystem}/unix/ext/fs.rs
- +70 −0 src/libsystem/unix/ext/io.rs
- +1 −1 src/{libstd/sys → libsystem}/unix/ext/mod.rs
- +89 −0 src/libsystem/unix/ext/process.rs
- +62 −0 src/libsystem/unix/fd.rs
- +215 −189 src/{libstd/sys → libsystem}/unix/fs.rs
- +35 −36 src/{libstd/sys → libsystem}/unix/mod.rs
- +27 −22 src/{libstd/sys → libsystem}/unix/mutex.rs
- +49 −50 src/{libstd/sys → libsystem}/unix/net.rs
- +116 −0 src/libsystem/unix/os.rs
- +4 −0 src/{libstd/sys → libsystem}/unix/os_str.rs
- +25 −0 src/libsystem/unix/path.rs
- +18 −13 src/{libstd/sys → libsystem}/unix/pipe.rs
- +191 −132 src/{libstd/sys → libsystem}/unix/process.rs
- +231 −0 src/libsystem/unix/rand.rs
- +2 −2 src/{libstd/sys/unix/ext → libsystem/unix}/raw.rs
- +73 −0 src/libsystem/unix/rt.rs
- +18 −16 src/{libstd/sys → libsystem}/unix/rwlock.rs
- +23 −13 src/{libstd/sys → libsystem}/unix/stack_overflow.rs
- +59 −0 src/libsystem/unix/stdio.rs
- +9 −0 src/{libstd/sys → libsystem}/unix/sync.rs
- +71 −54 src/{libstd/sys → libsystem}/unix/thread.rs
- 0 src/{libstd/sys → libsystem}/unix/thread_local.rs
- +25 −28 src/{libstd/sys → libsystem}/unix/time.rs
- +24 −0 src/libsystem/unwind.rs
- 0 src/{libstd/sys → libsystem}/windows/backtrace.rs
- 0 src/{libstd/sys → libsystem}/windows/c.rs
- 0 src/{libstd/sys → libsystem}/windows/compat.rs
- 0 src/{libstd/sys → libsystem}/windows/condvar.rs
- +139 −0 src/libsystem/windows/dynamic_lib.rs
- 0 src/{libstd/sys → libsystem}/windows/fs.rs
- 0 src/{libstd/sys → libsystem}/windows/handle.rs
- 0 src/{libstd/sys → libsystem}/windows/mod.rs
- 0 src/{libstd/sys → libsystem}/windows/mutex.rs
- 0 src/{libstd/sys → libsystem}/windows/net.rs
- +11 −0 src/{libstd/sys → libsystem}/windows/os.rs
- +4 −0 src/{libstd/sys → libsystem}/windows/os_str.rs
- +99 −0 src/libsystem/windows/path.rs
- 0 src/{libstd/sys → libsystem}/windows/pipe.rs
- 0 src/{libstd/sys → libsystem}/windows/printing/gnu.rs
- 0 src/{libstd/sys → libsystem}/windows/printing/msvc.rs
- 0 src/{libstd/sys → libsystem}/windows/process.rs
- +97 −0 src/libsystem/windows/rand.rs
- 0 src/{libstd/sys → libsystem}/windows/rwlock.rs
- 0 src/{libstd/sys → libsystem}/windows/stack_overflow.rs
- 0 src/{libstd/sys → libsystem}/windows/stdio.rs
- 0 src/{libstd/sys → libsystem}/windows/thread.rs
- 0 src/{libstd/sys → libsystem}/windows/thread_local.rs
- 0 src/{libstd/sys → libsystem}/windows/time.rs
- +14 −37 src/{libstd/sys/common → libsystem}/wtf8.rs
- +11 −0 src/libterm/Cargo.toml
- +13 −0 src/libtest/Cargo.toml
- +4 −4 src/libtest/lib.rs
- +1 −1 src/rustllvm/RustWrapper.cpp
| @@ -77,6 +77,7 @@ | |||
| /stage3/ | |||
| /test/ | |||
| /tmp/ | |||
| Cargo.lock | |||
| TAGS | |||
| TAGS.emacs | |||
| TAGS.vi | |||
| @@ -89,6 +90,7 @@ lexer.ml | |||
| src/.DS_Store | |||
| src/etc/dl | |||
| src/librustc_llvm/llvmdeps.rs | |||
| target/ | |||
| tmp.*.rs | |||
| version.md | |||
| version.ml | |||
| @@ -0,0 +1,33 @@ | |||
| [package] | |||
| name = "std_group" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [lib] | |||
| name = "std_group" | |||
| path = "src/libsystem/deps/dummy.rs" | |||
|
|
|||
| [dependencies] | |||
| system = { path = "src/libsystem", optional = true, default-features = false } | |||
| std = { path = "src/libstd", optional = true, default-features = false } | |||
| alloc_system = { path = "src/liballoc_system", optional = true } | |||
| alloc_jemalloc = { path = "src/liballoc_jemalloc", optional = true } | |||
|
|
|||
| arena = { path = "src/libarena", optional = true } | |||
| collectionstest = { path = "src/libcollectionstest", optional = true } | |||
| coretest = { path = "src/libcoretest", optional = true } | |||
| fmt_macros = { path = "src/libfmt_macros", optional = true } | |||
| flate = { path = "src/libflate", optional = true } | |||
| getopts = { path = "src/libgetopts", optional = true } | |||
| graphviz = { path = "src/libgraphviz", optional = true } | |||
| log = { path = "src/liblog", optional = true } | |||
| rbml = { path = "src/librbml", optional = true } | |||
| serialize = { path = "src/libserialize", optional = true } | |||
| term = { path = "src/libterm", optional = true } | |||
| syntax = { path = "src/libsyntax", optional = true } | |||
| test = { path = "src/libtest", optional = true } | |||
|
|
|||
| [features] | |||
| libstd = [ "system", "std", "system/rust_builtin", "system/compiler-rt", "system/backtrace", "alloc_system", "alloc_jemalloc" ] | |||
| libstd_light = [ "system", "std", "system/disable-backtrace", "alloc_system" ] | |||
| deps = [ "arena", "collectionstest", "coretest", "fmt_macros", "flate", "getopts", "graphviz", "log", "rbml", "serialize", "syntax", "term", "test" ] | |||
| @@ -0,0 +1,56 @@ | |||
| #!/bin/bash | |||
| set -eu | |||
|
|
|||
| if [ $# -lt 1 ]; then | |||
| echo Usage: $0 TARGET [LLVM_CONFIG] | |||
| echo ex: $0 x86_64-unknown-linux-gnu /usr/bin/llvm-config | |||
| exit 1 | |||
| fi | |||
|
|
|||
| ROOT="$PWD" | |||
| TARGET="$1" | |||
| PROFILE="debug" | |||
| PROFILE="release" | |||
|
|
|||
| if [ $# -lt 2 ]; then | |||
| LLVM_CONFIG="$ROOT/$TARGET/llvm/Release/bin/llvm-config" | |||
| shift 1 | |||
| else | |||
| LLVM_CONFIG="$2" | |||
| shift 2 | |||
| fi | |||
|
|
|||
| HOST=`$LLVM_CONFIG --host-target` | |||
|
|
|||
| export RUSTC="$ROOT/rustc-sysroot" | |||
| export RUST_TARGET_PATH="$ROOT" | |||
| export CARGO_TARGET_DIR="$ROOT/target" | |||
| export CFG_LLVM_LINKAGE_FILE="$CARGO_TARGET_DIR/$TARGET/llvmdeps.rs" | |||
| export CFG_COMPILER_HOST_TRIPLE="$HOST" | |||
| export CFG_LLVM_CONFIG="$LLVM_CONFIG" | |||
| export CFG_LLVM_STDCPP="stdc++" | |||
|
|
|||
| export CARGO_TARGET_DIR="$ROOT/target/std" | |||
| cargo build --manifest-path "$ROOT/Cargo.toml" --target $TARGET --features libstd "$@" | |||
| #cargo build --manifest-path "$ROOT/Cargo.toml" --target $TARGET --features libstd_light "$@" | |||
|
|
|||
| SYSROOT="$CARGO_TARGET_DIR/lib/rustlib/$TARGET" | |||
| mkdir -p "$SYSROOT/lib" | |||
| ln -sf "$CARGO_TARGET_DIR/$TARGET/$PROFILE/deps/lib"{alloc,backtrace,collections,compiler_rt,core,libc,rand,rust_builtin,rustc_bitflags,rustc_unicode,system,std}*.rlib "$SYSROOT/lib/" | |||
| ln -sf "$CARGO_TARGET_DIR/$TARGET/$PROFILE/deps/libcompiler_rt.a" "$SYSROOT/lib/" | |||
|
|
|||
| export CARGO_TARGET_DIR="$ROOT/target/non-std" | |||
| export RUSTC_SYSROOT="$SYSROOT/../../../" | |||
| cargo build --manifest-path "$ROOT/Cargo.toml" --target $TARGET --features deps "$@" | |||
| ln -sf "$CARGO_TARGET_DIR/$TARGET/$PROFILE/deps/lib"{arena,collectionstest,coretest,fmt_macros,flate,getopts,graphviz,log,rbml,serialize,syntax,term,test}*.rlib "$SYSROOT/lib/" | |||
|
|
|||
| export CARGO_TARGET_DIR="$ROOT/target/staging" | |||
| export CFG_LLVM_LINKAGE_FILE="$CARGO_TARGET_DIR/$TARGET/llvmdeps.rs" | |||
| #cargo test --manifest-path "$ROOT/src/libsystem/Cargo.toml" --target $TARGET --no-default-features --features "compiler-rt backtrace rust_builtin" "$@" | |||
| #cargo test --manifest-path "$ROOT/src/libstd/Cargo.toml" --target $TARGET --no-default-features --features "compiler-rt backtrace rust_builtin" "$@" | |||
| #exit | |||
| #cargo build --manifest-path "$ROOT/Cargo.toml" --target $TARGET --features libstd "$@" | |||
| cargo build --manifest-path "$ROOT/src/librustc_driver/Cargo.toml" --target $TARGET --bin rustc "$@" | |||
| cargo build --manifest-path "$ROOT/src/librustdoc/Cargo.toml" --target $TARGET --bin rustdoc "$@" | |||
| cargo build --manifest-path "$ROOT/src/compiletest/Cargo.toml" --target $TARGET "$@" | |||
| cargo build --manifest-path "$ROOT/src/error-index-generator/Cargo.toml" --target $TARGET "$@" | |||
| @@ -0,0 +1,28 @@ | |||
| #!/bin/bash | |||
|
|
|||
| if [ -z "$RUSTC_SYSROOT" ]; then | |||
| RUSTC_SYSROOT=/dev/null | |||
| fi | |||
|
|
|||
| if [ -z "$RUSTC_RUSTC" ]; then | |||
| RUSTC_RUSTC=rustc | |||
| fi | |||
|
|
|||
| if [[ "$*" == *"build-script-build"* ]]; then | |||
| IS_BUILD=y | |||
| elif [[ "$*" != *"--target"* ]]; then | |||
| IS_BUILD=y | |||
| else | |||
| IS_BUILD= | |||
| fi | |||
|
|
|||
| if [ -n "$IS_BUILD" ]; then | |||
| if [ -n "$RUSTC_NATIVE_SYSROOT" ]; then | |||
| exec "$RUSTC_RUSTC" --sysroot="$RUSTC_NATIVE_SYSROOT" "$@" | |||
| else | |||
| exec "$RUSTC_RUSTC" "$@" | |||
| fi | |||
| else | |||
| DEPS=`echo "$*" | grep -Eo 'dependency=[^ ]*/deps' | sed 's/^dependency=/-L /' | head -n 1` | |||
| exec "$RUSTC_RUSTC" --sysroot="$RUSTC_SYSROOT" $DEPS "$@" | |||
| fi | |||
| @@ -0,0 +1,8 @@ | |||
| [package] | |||
| name = "compiletest" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [[bin]] | |||
| name = "compiletest" | |||
| path = "compiletest.rs" | |||
| @@ -0,0 +1,11 @@ | |||
| [package] | |||
| name = "error-index-generator" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [[bin]] | |||
| name = "error-index-generator" | |||
| path = "main.rs" | |||
|
|
|||
| [dependencies] | |||
| rustdoc = { path = "../librustdoc" } | |||
| @@ -0,0 +1,11 @@ | |||
| [package] | |||
| name = "alloc" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [lib] | |||
| name = "alloc" | |||
| path = "lib.rs" | |||
|
|
|||
| [dependencies] | |||
| core = { path = "../libcore" } | |||
| @@ -0,0 +1,17 @@ | |||
| [package] | |||
| name = "alloc_jemalloc" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
| links = "jemalloc" | |||
| build = "build.rs" | |||
|
|
|||
| [lib] | |||
| name = "alloc_jemalloc" | |||
| path = "lib.rs" | |||
|
|
|||
| [dependencies] | |||
| core = { path = "../libcore" } | |||
| libc = { path = "../liblibc" } | |||
|
|
|||
| [build-dependencies] | |||
| gcc = { git = "https://github.com/alexcrichton/gcc-rs.git" } | |||
| @@ -0,0 +1,40 @@ | |||
| use std::process::Command; | |||
| use std::fs::rename; | |||
| use std::path::PathBuf; | |||
| use std::env; | |||
|
|
|||
| extern crate gcc; | |||
|
|
|||
| fn main() { | |||
| let dir = env::current_dir().unwrap(); | |||
| let out_dir = PathBuf::from(&env::var_os("OUT_DIR").unwrap()); | |||
|
|
|||
| let config = gcc::Config::new().get_compiler(); | |||
| let cflags = config.args().into_iter().cloned().map(|c| c.into_string().unwrap()).fold(String::new(), |mut args, arg| { args.push_str(&arg); args.push(' '); args }); | |||
|
|
|||
| let jemalloc = dir.join("../jemalloc"); | |||
|
|
|||
| run(Command::new("sh") | |||
| .env("CFLAGS", cflags) | |||
| .env("CC", config.path()) | |||
| .current_dir(&out_dir) | |||
| .arg(jemalloc.join("configure")) | |||
| .arg("--with-jemalloc-prefix=je_") | |||
| .arg("--disable-fill") | |||
| .arg(format!("--host={}", env::var("TARGET").unwrap())) | |||
| .arg(format!("--build={}", env::var("HOST").unwrap()))); | |||
|
|
|||
| run(Command::new("make") | |||
| .current_dir(&out_dir) | |||
| .arg(&format!("-j{}", env::var("NUM_JOBS").unwrap())) | |||
| .arg(&format!("INCDIR={}", jemalloc.display()))); | |||
|
|
|||
| rename(&out_dir.join("lib").join("libjemalloc_pic.a"), &out_dir.join("libjemalloc.a")).unwrap(); | |||
|
|
|||
| println!("cargo:rustc-flags=-L native={} -l static={}", out_dir.display(), "jemalloc"); | |||
| } | |||
|
|
|||
| fn run(cmd: &mut Command) { | |||
| println!("running: {:?}", cmd); | |||
| cmd.status().unwrap(); | |||
| } | |||
| @@ -0,0 +1,12 @@ | |||
| [package] | |||
| name = "alloc_system" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [lib] | |||
| name = "alloc_system" | |||
| path = "lib.rs" | |||
|
|
|||
| [dependencies] | |||
| core = { path = "../libcore" } | |||
| libc = { path = "../liblibc" } | |||
| @@ -0,0 +1,8 @@ | |||
| [package] | |||
| name = "arena" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [lib] | |||
| name = "arena" | |||
| path = "lib.rs" | |||
| @@ -0,0 +1,13 @@ | |||
| [package] | |||
| name = "collections" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [lib] | |||
| name = "collections" | |||
| path = "lib.rs" | |||
|
|
|||
| [dependencies] | |||
| core = { path = "../libcore" } | |||
| alloc = { path = "../liballoc" } | |||
| rustc_unicode = { path = "../librustc_unicode" } | |||
| @@ -0,0 +1,12 @@ | |||
| [package] | |||
| name = "collectionstest" | |||
| version = "1.0.0" | |||
| authors = ["The Rust Project Developers"] | |||
|
|
|||
| [lib] | |||
| name = "collectionstest" | |||
| path = "lib.rs" | |||
|
|
|||
| [dependencies] | |||
| log = { path = "../liblog" } | |||
| test = { path = "../libtest" } | |||
| @@ -347,6 +347,7 @@ fn test_bad_zst() { | |||
| } | |||
| } | |||
|
|
|||
| #[cfg(test)] | |||
| mod bench { | |||
| use std::collections::BTreeMap; | |||
| use std::__rand::{Rng, thread_rng}; | |||
| @@ -0,0 +1,8 @@ | |||
| [package] | |||
| name = "core" | |||
| version = "1.0.0" | |||
| authors = ["The Project Rust Developers"] | |||
|
|
|||
| [lib] | |||
| name = "core" | |||
| path = "lib.rs" | |||
| @@ -163,6 +163,7 @@ pub mod simd; | |||
|
|
|||
| pub mod slice; | |||
| pub mod str; | |||
| pub mod time; | |||
| pub mod hash; | |||
| pub mod fmt; | |||
|
|
|||
| @@ -158,12 +158,10 @@ macro_rules! debug_assert_eq { | |||
| /// `libstd` contains a more general `try!` macro that uses `From<E>`. | |||
| #[macro_export] | |||
| macro_rules! try { | |||
| ($e:expr) => ({ | |||
| use $crate::result::Result::{Ok, Err}; | |||
|
|
|||
| match $e { | |||
| Ok(e) => e, | |||
| Err(e) => return Err(e), | |||
| ($expr:expr) => (match $expr { | |||
| $crate::result::Result::Ok(val) => val, | |||
| $crate::result::Result::Err(err) => { | |||
| return $crate::result::Result::Err($crate::convert::From::from(err)) | |||
| } | |||
| }) | |||
| } | |||
Oops, something went wrong.