Commit Graph

3112 Commits

Author SHA1 Message Date
Alex Crichton 526640668d rustbuild: Enable cross-compiling LLVM
Currently all multi-host builds assume the the build platform can run the
`llvm-config` binary generated for each host platform we're creating a compiler
for. Unfortunately this assumption isn't always true when cross compiling, so we
need to handle this case.

This commit alters the build script of `rustc_llvm` to understand when it's
running an `llvm-config` which is different than the platform we're targeting for.
2016-02-28 10:50:13 -08:00
Alex Crichton a707a61cae rustbuild: Fix compiler-rt build on gnueabihf
Needs a different target to get built and also we apparently need to appease the
C++ compiler somehow.
2016-02-28 10:50:13 -08:00
Alex Crichton 93a3b294c7 rustbuild: Only pass RUSTC_FLAGS to target compiles
These flags aren't applicable to build scripts, and may actuall wreak havoc.
2016-02-28 10:50:13 -08:00
Alex Crichton 90d28ec372 rustbuild: Enable bootstrapping new hosts
This commit fixes a longstanding issue with the makefiles where all host
platforms bootstrap themselves. This commit alters the build logic for the
bootstrap to instead only bootstrap the build triple, and all other compilers
are compiled from that one compiler.

The benefit of this change is that we can cross-compile compilers which cannot
run on the build platform. For example our builders could start creating
`arm-unknown-linux-gnueabihf` compilers.

This reduces the amount of bootstrapping we do, reducing the amount of test
coverage, but overall it should largely just end in faster build times for
multi-host compiles as well as enabling a feature which can't be done today.

cc #5258
2016-02-28 10:50:13 -08:00
bors df128bdc4c Auto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson
This removes creating some extraneous directories and also fixes some submodule management with out of tree builds.

Closes #31619
2016-02-20 08:47:25 +00:00
Alex Crichton 848e78550c rustbuild: Add rustbook/standalone doc support
This commit implements documentation generation of the nomicon, the book, the
style guide, and the standalone docs. New steps were added for each one as well
as appropriate makefile targets for each one as well.
2016-02-16 10:39:55 -08:00
Alex Crichton 5aef0e8fac rustbuild: Fix submodules for out of tree builds
Be sure to put the git command into the right directory when we run the
submodule management information.

Closes #31619
2016-02-12 17:16:00 -08:00
Alex Crichton 07638b95ce bootstrap: Be resilient to job object failures
The build bots already use job objects, and they don't support nested job
objects, and we shouldn't entirely bail out in this case anyway!
2016-02-12 10:40:32 -08:00
Alex Crichton a1c13d03a5 bootstrap: Add a --clean flag
Also add a `clean` target for the makefiles to blow away everything related to
the build. Note that this specifically does not tamper with:

* the LLVM build directory
* the directory of the bootstrap system
* the cached downloads of cargo/rustc
2016-02-11 20:44:03 -08:00
Alex Crichton bb2e92171f 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!
2016-02-11 11:12:33 -08:00
Alex Crichton 0a54e4dd87 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.
2016-02-11 10:42:43 -08:00
Alex Crichton 046e6874c4 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!
2016-02-11 10:42:28 -08:00