Commit graph

31 commits

Author SHA1 Message Date
Heather
8a593a8bdb support for GNU configure syntax 2013-10-29 16:22:08 -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
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
Young-il Choi
930908aa90 mk: target.mk host.mk fix for duplicated rules of mingw32 after #6235 2013-05-07 15:29:05 +09:00
Felix S. Klock II
175a5eea42 Fix another goof: consistently use parent directory of target for rule.
(I wonder if there's a better way to write this in the rule itself;
i.e. something like `$$(dirname $$@)`.  But for now this will do.)
2013-05-04 12:46:11 +02:00
Felix S. Klock II
495bceb9b0 Fix syntax: had to use escaped $$ to have an effect after first expansion. 2013-05-04 10:57:56 +02:00
Felix S. Klock II
4dd0fa6876 Make build products depend on their target directories.
This is an attempt to address Issue #3326 by adding [*order-only*][1]
prerequsites of each build product on the directory where it is to go.
It is important that the prerequisites be order-only, since the
timestamp on a parent directory is not relevant to whether a product
is out of date; the parent directory merely needs to exist.

(This use case of generating target directories was provided as an
[example][2] of how order-only prequisites are used.)

[1]: http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

[2]: http://www.kolpackov.net/pipermail/notes/2004-January/000001.html
2013-05-03 18:53:47 +02: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
Graydon Hoare
d1affff623 Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
Graydon Hoare
cbee91916b Even simpler attempt at solving the .dSYM mess. 2012-07-13 13:04:36 -07:00
Graydon Hoare
6426f05b8f Revert "Try less complicated trick for solving the dSYM glob portability issue."
This reverts commit 86dfca278d.
2012-07-13 13:04:36 -07:00
Graydon Hoare
86dfca278d Try less complicated trick for solving the dSYM glob portability issue. 2012-07-11 15:10:18 -07:00
Graydon Hoare
63df248414 Revert "Reorganize lib-glob code to avoid accidentally duplicating lib/ subdirectory."
This reverts commit 2cf6bf87c3.
2012-07-11 15:04:32 -07:00
Graydon Hoare
2cf6bf87c3 Reorganize lib-glob code to avoid accidentally duplicating lib/ subdirectory. 2012-07-11 12:10:54 -07:00
Kevin Cantu
7dcbaedd32 Rename librustsyntax to libsyntax
Per issue #2418.
2012-05-31 11:15:00 -07:00
Brian Anderson
e4f5f235e4 build: Fix mac build errors 2012-05-30 21:23:34 -07:00
Brian Anderson
a0ed1fb20b build: Introduce rustsyntax crate 2012-03-29 14:42:30 -07:00
Niko Matsakis
ea6030878a update promotion rules to not fail when .dsym file does not exist 2012-03-22 07:31:18 -07:00
Josh Matthews
8142438938 Avoid mangling names differently in debug builds to work around a build error. Fix up file name and path debug information, and build one compilation unit for a crate instead of one per source file. 2012-03-21 18:56:36 -04:00
Marijn Haverbeke
3aed4b04ce [makefiles] Make rustc depend on librustc
This ensures the lib is not just built, but also copied into the right
lib directory when a rustc binary is used as make target.
2012-01-26 15:43:39 +01: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
6dbd4c21e9 rustc: build versioned library with hash in its name
Also updated build to install versioned libraries and added a few
missing actions for `make clean`.
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
Niko Matsakis
9c12c7c7f5 basic builds function 2011-11-29 12:51:07 -08:00
Brian Anderson
93035722a4 Remove temporary build rules 2011-10-31 15:19:03 -07:00
Brian Anderson
86459b3517 Add some transitional build rules for moving libstd.so to libruststd.so 2011-10-31 14:43:43 -07: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