]> git.proxmox.com Git - rustc.git/blob - src/rustc/std_shim/Cargo.toml
New upstream version 1.16.0+dfsg1
[rustc.git] / src / rustc / std_shim / Cargo.toml
1 # This is a shim Cargo.toml which serves as a proxy for building the standard
2 # library. The reason for this is a little subtle, as one might reasonably
3 # expect that we just `cargo build` the standard library itself.
4 #
5 # One of the output artifacts for the standard library is a dynamic library, and
6 # on platforms like OSX the name of the output artifact is actually encoded into
7 # the library itself (similar to a soname on Linux). When the library is linked
8 # against, this encoded name is what's literally looked for at runtime when the
9 # dynamic loader is probing for libraries.
10 #
11 # Cargo, however, by default will not mangle the output filename of the
12 # top-level target. If we were to run `cargo build` on libstd itself, we would
13 # generate a file `libstd.so`. When installing, however, this file is called
14 # something like `libstd-abcdef0123.so`. On OSX at least this causes a failure
15 # at runtime because the encoded "soname" is `libstd.so`, not what the file is
16 # actually called.
17 #
18 # By using this shim library to build the standard library by proxy we sidestep
19 # this problem. The standard library is built with mangled hex already in its
20 # name so there's nothing extra we need to do.
21
22 [package]
23 name = "std_shim"
24 version = "0.1.0"
25 authors = ["The Rust Project Developers"]
26
27 [lib]
28 name = "std_shim"
29 path = "lib.rs"
30 doc = false
31
32 [dependencies]
33 std = { path = "../../libstd" }
34 core = { path = "../../libcore" }
35
36 # Reexport features from std
37 [features]
38 backtrace = ["std/backtrace"]
39 debug-jemalloc = ["std/debug-jemalloc"]
40 jemalloc = ["std/jemalloc"]
41 force_alloc_system = ["std/force_alloc_system"]
42 panic-unwind = ["std/panic-unwind"]