-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Cargo-based build system to eventually replace make #31123
Add a Cargo-based build system to eventually replace make #31123
Commits on Feb 11, 2016
-
Add a Cargo-based build system
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!
Configuration menu - View commit details
-
Copy full SHA for 046e687 - Browse repository at this point
Copy the full SHA 046e687View commit details -
bootstrap: Read configuration from config.mk
During the transition period where we're still using ./configure and makefiles, read some extra configuration from `config.mk` if it's present. This means that the bootstrap build should be configured the same as the original ./configure invocation. Eventually this will all be removed in favor of only storing information in `config.toml` (e.g. the configure script will generate config.toml), but for now this should suffice.
Configuration menu - View commit details
-
Copy full SHA for 0a54e4d - Browse repository at this point
Copy the full SHA 0a54e4dView commit details -
configure: Remove default NDK path value
This likely isn't always valid, and subverts auto-detection.
Configuration menu - View commit details
-
Copy full SHA for 7cbd245 - Browse repository at this point
Copy the full SHA 7cbd245View commit details -
bootstrap: Add a bunch of Cargo.toml files
These describe the structure of all our crate dependencies.
Configuration menu - View commit details
-
Copy full SHA for 2581b14 - Browse repository at this point
Copy the full SHA 2581b14View commit details -
bootstrap: Add build scripts for crates
This commits adds build scripts to the necessary Rust crates for all the native dependencies. This is currently a duplication of the support found in mk/rt.mk and is my best effort at representing the logic twice, but there may be some unfortunate-and-inevitable divergence. As a summary: * alloc_jemalloc - build script to compile jemallocal * flate - build script to compile miniz.c * rustc_llvm - build script to run llvm-config and learn about how to link it. Note that this crucially (and will not ever) compile LLVM as that would take far too long. * rustdoc - build script to compile hoedown * std - script to determine lots of libraries/linkages as well as compile libbacktrace
Configuration menu - View commit details
-
Copy full SHA for 4da4970 - Browse repository at this point
Copy the full SHA 4da4970View commit details -
bootstrap: Add directives to not double-link libs
Have all Cargo-built crates pass `--cfg cargobuild` and then add appropriate `#[cfg]` definitions to all crates to avoid linking anything if this is passed. This should help allow libstd to compile with both the makefiles and with Cargo.
Configuration menu - View commit details
-
Copy full SHA for eac0a8b - Browse repository at this point
Copy the full SHA eac0a8bView commit details -
rustbook: Make
main
a public functionThis will allow it to be used as a crate in a Cargo-based build
Configuration menu - View commit details
-
Copy full SHA for 32c5613 - Browse repository at this point
Copy the full SHA 32c5613View commit details -
rustc_llvm: Tweak how initialization is performed
Refactor a bit to have less repetition and #[cfg] and try to bury it all inside of a macro.
Configuration menu - View commit details
-
Copy full SHA for 34f7364 - Browse repository at this point
Copy the full SHA 34f7364View commit details -
configure: Add an option to use the cargo build system
This commit adds a `--enable-rustbuild` option to the configure script which will copy a different `Makefile.in` into place to intercept all `make` invocations. Currently this makefile only has one target, but it's expected to be filled out quite a bit over time!
Configuration menu - View commit details
-
Copy full SHA for bb2e921 - Browse repository at this point
Copy the full SHA bb2e921View commit details -
rustc_back: Fix disabling jemalloc
When building with Cargo we need to detect `feature = "jemalloc"` to enable jemalloc, so propagate this same change to the build system to pass the right `--cfg` argument.
Configuration menu - View commit details
-
Copy full SHA for 55dd595 - Browse repository at this point
Copy the full SHA 55dd595View commit details