about summary refs log tree commit diff
path: root/mk/stage0.mk
AgeCommit message (Collapse)AuthorLines
2017-02-06Delete the `mk` folderAlex Crichton-49/+0
This commit deletes the old build system located in the `mk` folder as it's now been obsoleted for two cycles and is replaced by rustbuild.
2016-07-15mk: If local-rust is the same as the current version, then force a local-rebuildXimin Luo-0/+1
2016-04-19mk: Bootstrap from stable instead of snapshotsAlex Crichton-6/+3
This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
2014-11-20mk/stage0: complain instead of creating an empty fileCody P Schafer-1/+1
If the expected rustc snapshot is not where we expect it to be, complain and fail at that point rather than creating a empty rustc file and continuing until we try to run it.
2014-09-24mk: Fix a minor makefile warning on windowsBrian Anderson-0/+3
2014-07-23mk: Remove extra whitespace before line continuation backslashesBirunthan Mohanathas-4/+4
2014-06-13remove unnecessary PaX detectionDaniel Micay-4/+0
Rust no longer has support for JIT compilation, so it doesn't currently require a PaX MPROTECT exception. The extended attributes are preferred over modifying the binaries so it's not actually going to work on most systems like this anyway. If JIT compilation ends up being supported again, it should handle this by *always* applying the exception via an extended attribute without performing auto-detection of PaX on the host. The `paxctl` tool is only necessary with the older method involving modifying the ELF binary.
2014-03-25configure: Make rustlibdir non-configurableBrian Anderson-1/+1
Trying to reduce the complexity of installation
2014-01-05Make rustc's own lib directory configurable and change the default to ↵Jan Niklas Hasse-1/+1
rustlib. Fixes #3319
2013-12-07Register new snapshotsAlex Crichton-67/+0
This transitions the snapshot dependency process to understand that our snapshots are now a single static binary rather than an array of files.
2013-12-06Link rustllvm statically, and distribute a static snapshotAlex Crichton-11/+2
In order to keep up to date with changes to the libraries that `llvm-config` spits out, the dependencies to the LLVM are a dynamically generated rust file. This file is now automatically updated whenever LLVM is updated to get kept up-to-date. At the same time, this cleans out some old cruft which isn't necessary in the makefiles in terms of dependencies. Closes #10745 Closes #10744
2013-11-01configure: Fix passing multiple target and host triples.Luqman Aden-7/+7
2013-10-30auto merge of #10164 : brson/rust/configure, r=brsonbors-23/+23
Rebase of #9990
2013-10-29support for GNU configure syntaxHeather-23/+23
2013-10-29Register new snapshotsAlex Crichton-11/+7
2013-10-29Move rust's uv implementation to its own crateAlex Crichton-2/+19
There are a few reasons that this is a desirable move to take: 1. Proof of concept that a third party event loop is possible 2. Clear separation of responsibility between rt::io and the uv-backend 3. Enforce in the future that the event loop is "pluggable" and replacable Here's a quick summary of the points of this pull request which make this possible: * Two new lang items were introduced: event_loop, and event_loop_factory. The idea of a "factory" is to define a function which can be called with no arguments and will return the new event loop as a trait object. This factory is emitted to the crate map when building an executable. The factory doesn't have to exist, and when it doesn't then an empty slot is in the crate map and a basic event loop with no I/O support is provided to the runtime. * When building an executable, then the rustuv crate will be linked by default (providing a default implementation of the event loop) via a similar method to injecting a dependency on libstd. This is currently the only location where the rustuv crate is ever linked. * There is a new #[no_uv] attribute (implied by #[no_std]) which denies implicitly linking to rustuv by default Closes #5019
2013-09-26Fix for make -j race from #9531 injected by cleanup in b1a22518f0c687db.Felix S. Klock II-2/+0
2013-09-01small cleanup of previous commit with mucho comments.Felix S. Klock II-1/+3
2013-07-09Fix #3225: Incorporate feedback from Graydon.Felix S. Klock II-6/+6
Namely, switched in many places to using GNU make provided functions for directory listing and text processing, rather than spawning a shell process to do that work. In the process of the revision, learned about Target-specific variables, which were very applicable to INSTALL_LIB (which, on a per-recipe basis, was always receiving the same actual arguments for its first two formal parameters in every invocation). http://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html (We might be able to make use of those in future refactorings.) ---- Also adds a cleanup pass to get-snapshot.py as well, since the same problem arises when we unpack libraries from the snapshot archive into a build directory with a prior snapshot's artifacts. (I put this step into the python script rather than the makefile because I wanted to delay the cleanup pass until after we have at least successfully downloaded the tarball. That way, if the download fails, you should not destroy the previous unarchived snapshot libraries and build products.) ---- Also reverted whitespace changes to minimize diff. I plan to put them back in in a dedicated commit elsewhere.
2013-07-07Fix #3225: Check for old Rust libraries when building and installing.Felix S. Klock II-13/+42
When building Rust libraries (e.g. librustc, libstd, etc), checks for and verbosely removes previous build products before invoking rustc. (Also, when Make variable VERBOSE is defined, it will list all of the libraries matching the object library's glob after the rustc invocation has completed.) When installing Rust libraries, checks for previous libraries in target install directory, but does not remove them. The thinking behind these two different modes of operation is that the installation target, unlike the build tree, is not under the control of this infrastructure and it is not up to this Makefile to decide if the previous libraries should be removed.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-7/+7
This only changes the directory names; it does not change the "real" metadata names.
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-3/+3
2013-03-02mk: cleanup - lib and executable suffix handlingYoung-il Choi-21/+21
2013-02-27mk: rewrite make filesYoung-il Choi-18/+18
2013-02-21mk: Split target triples into bulid triple + host triples + target triplesBrian Anderson-15/+15
For cross compiling to targets that don't want to build a compiler
2013-01-03add missing $(CFG_PYTHON) prefixesDaniel Micay-1/+1
2012-10-05Rename configure --enable-pax-marks flag to --enable-pax-flags flag.auREAX-2/+2
2012-10-04Add GRSecurity compatibility with --enable-pax-marks configure flag; add ↵auREAX-0/+4
GRSecurity autodetection code to configure.
2012-04-10add the option --enable-local-rust to pull rust from your environmentEvan McClanahan-0/+6
rather than the snapshots. make sure to get all of the files. update to add nmatsakis' requested feature of pointing to a different rustc install root. usage: --enable-local-rust to enable --local-rust-root="/path/to/rustc/" to change the path, which defaults to "/usr/local/" Tested on OS X and Linux, likely broken on windows.
2012-02-24allow snapshot to be specified in make command lineNiko Matsakis-1/+3
2011-12-16Update build machinery to build and install librustc everywhere (including ↵Graydon Hoare-0/+9
snapshots).
2011-12-16build: Remove the temp hack for libraries renaming transitionHaitao Li-8/+0
2011-12-12build: Temp hack to make transition to new snapshotHaitao Li-2/+10
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-0/+9
2011-11-29build: Fix stage0 rules for non-host targetsBrian Anderson-3/+3
2011-11-29fix makefiles, add option to ignore changes in makefilesNiko Matsakis-2/+4
2011-11-29makefiles now seem to be working, rustc is notNiko Matsakis-0/+32
2011-11-29basic builds functionNiko Matsakis-7/+10
2011-10-02Lots of build system cleanup and documentationBrian Anderson-9/+6
This splits mk/stageN.mk into host.mk and target.mk and makes the build rules somewhat simpler - there's no more building from stageN into stageN+1; instead we always build from stageN(host) to stageN(target) then promote from stageN(target) to stageN+1(host). Add a big honkin explaination right at the top of Makefile.in
2011-09-30Abstract the build directories further in the makefilesBrian Anderson-5/+5
This defines variables for host bin and lib directories as well as all target bin and lib directories then uses them everywhere.
2011-09-29Register snapshots and finish filesystem reorgBrian Anderson-9/+0
2011-09-29Fix a variety of things in the makefilesBrian Anderson-2/+2
Make tests and perf work again. Correctly get the host triple in rustc. Add some FIXMEs about transitional code that needs to be removed.
2011-09-29Reorganize structure of build directoryBrian Anderson-6/+12
Each stage is organized more according to Unix standards and to accommodate multiple target architectures. stageN/ bin - rustc lives here lib - libraries that rustc needs lib/rustc/$(target_triple/ - target libraries
2011-09-23More steps to arch-specific target libs (#474)Graydon Hoare-10/+3
2011-08-14Register new snapshotsBrian Anderson-5/+2
Use main.o from the snapshot
2011-07-21Build the stage1 compiler against the newly built librustrt.Michael Sullivan-12/+5
2011-07-21Instantiate the stage0/lib/stdlib rules from stage0.mk instead of stageN.mk.Michael Sullivan-2/+4
2011-07-21Build stage0/lib/libstd.so using the stage0 compiler.Michael Sullivan-8/+10
This essentially starts the bootstrapping one step earlier by building the stdlib from source using the stage0 compiler and then using that stdlib to build the stage1 compiler. (Instead of starting by building the stage1 compiler and then building a stdlib with it). This means we should now be able to add features to the stdlib and use them in the compiler without having to do a snapshot. (On the flip side, this means that we now need to do a snapshot if we want to use a new language feature in the stdlib, but that doesn't really seem too burdensome (we already need to snapshot if we want to use a new language feature in the compiler)).
2011-07-20Add support for building with a static libstd for testing static crate support.Rafael Ávila de Espíndola-0/+3
2011-07-15Merge the stage1,2,3.mk files into a common definition in stageN.mk, more ↵Graydon Hoare-7/+21
rearrangement of host/target libs.