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.
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.
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
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.
25 authors = ["The Rust Project Developers"]
33 std = { path = "../../libstd" }
34 core = { path = "../../libcore" }
36 # Reexport features from std
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"]