046e6874c4
This commit is the start of a series of commits which start to replace the makefiles with a Cargo-based build system. The aim is not to remove the makefiles entirely just yet but rather just replace the portions that invoke the compiler to do the bootstrap. This commit specifically adds enough support to perform the bootstrap (and all the cross compilation within) along with generating documentation. More commits will follow up in this series to actually wire up the makefiles to call this build system, so stay tuned!
47 lines
1.7 KiB
TOML
47 lines
1.7 KiB
TOML
# This is a shim Cargo.toml which serves as a proxy for building the standard
|
|
# library. The reason for this is a little subtle, as one might reasonably
|
|
# expect that we just `cargo build` the standard library itself.
|
|
#
|
|
# One of the output artifacts for the standard library is a dynamic library, and
|
|
# on platforms like OSX the name of the output artifact is actually encoded into
|
|
# the library itself (similar to a soname on Linux). When the library is linked
|
|
# against, this encoded name is what's literally looked for at runtime when the
|
|
# dynamic loader is probing for libraries.
|
|
#
|
|
# Cargo, however, by default will not mangle the output filename of the
|
|
# top-level target. If we were to run `cargo build` on libstd itself, we would
|
|
# generate a file `libstd.so`. When installing, however, this file is called
|
|
# something like `libstd-abcdef0123.so`. On OSX at least this causes a failure
|
|
# at runtime because the encoded "soname" is `libstd.so`, not what the file is
|
|
# actually called.
|
|
#
|
|
# By using this shim library to build the standard library by proxy we sidestep
|
|
# this problem. The standard library is built with mangled hex already in its
|
|
# name so there's nothing extra we need to do.
|
|
|
|
[package]
|
|
name = "std_shim"
|
|
version = "0.1.0"
|
|
authors = ["The Rust Project Developers"]
|
|
|
|
[lib]
|
|
name = "std_shim"
|
|
path = "lib.rs"
|
|
|
|
[profile.release]
|
|
opt-level = 2
|
|
|
|
# These options are controlled from our rustc wrapper script, so turn them off
|
|
# here and have them controlled elsewhere.
|
|
[profile.dev]
|
|
debug = false
|
|
debug-assertions = false
|
|
|
|
[dependencies]
|
|
std = { path = "../../libstd" }
|
|
|
|
# Reexport features from std
|
|
[features]
|
|
jemalloc = ["std/jemalloc"]
|
|
debug-jemalloc = ["std/debug-jemalloc"]
|