Commit Graph

53 Commits

Author SHA1 Message Date
Alex Crichton
70273bb1d6 Register new snapshots
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-07 23:02:39 -08:00
Alex Crichton
e91ffb0710 Link rustllvm statically, and distribute a static snapshot
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-12-06 20:51:17 -08:00
Luqman Aden
12222f9825 configure: Fix passing multiple target and host triples. 2013-11-01 03:34:16 -04:00
bors
c888fc6db2 auto merge of #10164 : brson/rust/configure, r=brson
Rebase of #9990
2013-10-30 21:06:33 -07:00
Heather
8a593a8bdb support for GNU configure syntax 2013-10-29 16:22:08 -07:00
Alex Crichton
e203f30bc7 Register new snapshots 2013-10-29 15:56:16 -07:00
Alex Crichton
201cab84e8 Move rust's uv implementation to its own crate
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-10-29 08:39:22 -07:00
Felix S. Klock II
2835df2db6 Fix for make -j race from #9531 injected by cleanup in b1a22518f0. 2013-09-26 23:56:53 +02:00
Felix S. Klock II
b1a22518f0 small cleanup of previous commit with mucho comments. 2013-09-01 00:53:56 +02:00
Felix S. Klock II
25f51eeda0 Fix #3225: Incorporate feedback from Graydon.
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-09 13:08:50 +02:00
Felix S. Klock II
033ac5497e Fix #3225: Check for old Rust libraries when building and installing.
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-07-07 15:23:40 +02:00
Patrick Walton
0c820d4123 libstd: Rename libcore to libstd and libstd to libextra; update makefiles.
This only changes the directory names; it does not change the "real"
metadata names.
2013-05-22 21:57:05 -07:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
Young-il Choi
7714d52cd9 mk: cleanup - lib and executable suffix handling 2013-03-02 21:25:12 +09:00
Young-il Choi
26a5dc593c mk: rewrite make files 2013-02-27 14:53:35 +09:00
Brian Anderson
15c0c35352 mk: Split target triples into bulid triple + host triples + target triples
For cross compiling to targets that don't want to build a compiler
2013-02-21 17:51:55 -08:00
Daniel Micay
486217d7a2 add missing $(CFG_PYTHON) prefixes 2013-01-03 03:15:35 -05:00
auREAX
26ed387d7f Rename configure --enable-pax-marks flag to --enable-pax-flags flag. 2012-10-05 00:08:34 +02:00
auREAX
0bb437aafa Add GRSecurity compatibility with --enable-pax-marks configure flag; add GRSecurity autodetection code to configure. 2012-10-04 11:56:24 -07:00
Evan McClanahan
2c93b1b2df add the option --enable-local-rust to pull rust from your environment
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-04-10 20:32:40 -07:00
Niko Matsakis
be9914625b allow snapshot to be specified in make command line 2012-02-24 20:46:27 -08:00
Graydon Hoare
4f826b34cb Update build machinery to build and install librustc everywhere (including snapshots). 2011-12-16 17:21:28 -08:00
Haitao Li
55cc110822 build: Remove the temp hack for libraries renaming transition 2011-12-16 17:17:24 +08:00
Haitao Li
2ba317ddb2 build: Temp hack to make transition to new snapshot 2011-12-12 16:15:29 -08:00
Graydon Hoare
447414f007 Establish 'core' library separate from 'std'. 2011-12-06 12:13:04 -08:00
Brian Anderson
2979b3d006 build: Fix stage0 rules for non-host targets 2011-11-29 15:03:03 -08:00
Niko Matsakis
9c00c62b08 fix makefiles, add option to ignore changes in makefiles 2011-11-29 12:51:09 -08:00
Niko Matsakis
8371beb590 makefiles now seem to be working, rustc is not 2011-11-29 12:51:08 -08:00
Niko Matsakis
9c12c7c7f5 basic builds function 2011-11-29 12:51:07 -08:00
Brian Anderson
6e654564db Lots of build system cleanup and documentation
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-10-02 00:57:53 -07:00
Brian Anderson
38c67a4c8d Abstract the build directories further in the makefiles
This defines variables for host bin and lib directories as well as all target
bin and lib directories then uses them everywhere.
2011-09-30 16:18:19 -07:00
Brian Anderson
de6d07abf9 Register snapshots and finish filesystem reorg 2011-09-29 23:33:44 -07:00
Brian Anderson
6306c81826 Fix a variety of things in the makefiles
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-29 22:58:33 -07:00
Brian Anderson
0148daa058 Reorganize structure of build directory
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-29 22:58:33 -07:00
Graydon Hoare
18c6cc6371 More steps to arch-specific target libs (#474) 2011-09-23 10:50:16 -07:00
Brian Anderson
25b85df370 Register new snapshots
Use main.o from the snapshot
2011-08-14 14:38:08 -07:00
Michael Sullivan
bdbac006dc Build the stage1 compiler against the newly built librustrt. 2011-07-21 17:55:47 -07:00
Michael Sullivan
b01ecb10c3 Instantiate the stage0/lib/stdlib rules from stage0.mk instead of stageN.mk. 2011-07-21 12:15:36 -07:00
Michael Sullivan
d9286c8bdd Build stage0/lib/libstd.so using the stage0 compiler.
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-21 12:15:36 -07:00
Rafael Ávila de Espíndola
88894b6f9c Add support for building with a static libstd for testing static crate support. 2011-07-20 16:02:36 -04:00
Graydon Hoare
fafb42e6b1 Merge the stage1,2,3.mk files into a common definition in stageN.mk, more rearrangement of host/target libs. 2011-07-15 16:16:51 -07:00
Rafael Ávila de Espíndola
99a95b3613 Use new snapshot. 2011-07-11 18:35:25 -04:00
Rafael Ávila de Espíndola
d151e18633 Move llvm out of stageN/lib so that the host building stage 1+ can
have a newer and incompatible llvm with the bots.
2011-07-11 16:31:47 -04:00
Rafael Ávila de Espíndola
15a670a1b1 Use new snapshot. 2011-07-11 14:32:18 -04:00
Brian Anderson
106d0f3b72 Complete the transition of glue.o to the lib directory 2011-07-07 17:19:24 -07:00
Brian Anderson
94f782e6a1 Register new snapshots
New snapshots also include rt and rustllvm
2011-07-07 16:40:58 -07:00
Brian Anderson
2c234fdc97 Also copy rt and rustllvm to stage0 for now
Once we've updated the snapshots to include them we can remove these rules
2011-07-07 15:40:27 -07:00
Brian Anderson
59c76a371f Move creation of stageN/lib directories to the configure script 2011-06-17 18:36:44 -07:00
Brian Anderson
bd93e1abcd Register new snapshots. Update location of stage0's libstd 2011-06-17 18:19:37 -07:00
Patrick Walton
04f966f0bc build: Build intrinsics.bc 2011-05-04 18:29:08 -07:00