Commit graph

37 commits

Author SHA1 Message Date
Michael Sullivan
fd01031f3a Warn when using -o option on libraries. Closes #6554. 2013-08-05 11:41:06 -07:00
Felix S. Klock II
534dd628a7 Add dependence arc from running rustc to its libraries.
This commit fixes some oversights in the Makefile where rustc could be
invoked without some of its dependencies yet in place.  (I encountered
the problem in practice; its not just theoretical.)

As written in Makefile.in, $(STAGE$(1)_T_$(2)_H_$(3)) is the way one
writes an invocation of rustc where $(1) is the stage number $(2) is
the target triple $(3) is the host triple.  (Other uses of the macro
may plug in actual values or different parameters in for those three
formal parameters.)

When you have invocations of $(STAGE...), you need to make sure that
its dependences are satisfied; otherwise, if someone is using `make
-jN` for certain (large-ish) `N`, one can encounter situations where
GNU make attempts to invoke `rustc` before it has actually copied some
of its libraries into place, such as libmorestack.a, which causes a
link failure when the rustc invocation attempts to link in those
libraries.

In this case, the main prerequisite to add is TSREQ$(1)_T_$(2)_H_$(3),
which is described in Makefile.in as "Prerequisites for using the
stageN compiler to build target artifacts"

----

In addition to adding the extra dependences on TSREQ..., I also
replaced occurrences of the pattern:

    TSREQ$(1)_T_$(2)_H_$(3)
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

with:

    SREQ$(1)_T_$(2)_H_$(3)

which is equivalent to the above, as defined in Makefile.in

----

Finally, for the cases where TSREQ was missing in tests.mk, I went
ahead and put in a dependence on SREQ rather than just TSREQ, since it
was not clear to me how one could expect to compile those cases
without stdlib and extralib.

(It could well be that I should have gone ahead and done the same in
 other cases where I saw TSREQ was missing, and put SREQ in those
 cases as well.  But this seemed like a good measure for now, without
 needing to tax my understanding of the overall makefile
 infrastructure much further.)
2013-07-16 13:45:30 +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
Alex Crichton
8552a74775 Bring compiletest/rustpkg/driver up to date on std vs core 2013-07-04 16:30:48 -07:00
Brian Anderson
6511fe45e2 mk: Include all bins in the windows install 2013-06-27 19:00:12 -07:00
Alex Crichton
42b44b21b1 Rename all files with the 'rc' extension 2013-06-25 08:55:15 -07:00
Brian Anderson
069086cdb4 Remove the fuzzer
It is suffering from a bad case of megabitrot.
2013-06-15 16:12:56 -07: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
Alex Crichton
ae07170bd8 Update make dependencies of librust 2013-05-13 13:47:05 -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
Marvin Löbel
726fc877d1 Added rust convenience tool similar to go's go tool 2013-02-18 23:11:08 +01:00
Zack Corr
621c791ded Rename cargo to rustpkg and start over fresh 2013-02-15 18:04:10 -08:00
Graydon Hoare
d1affff623 Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
Brian Anderson
c3222f0130 Fix cargo and rustdoc inputs 2012-11-19 19:28:21 -08:00
Brian Anderson
9f15237937 Attempt to fix tools.mk under cross-compile 2012-11-07 21:19:01 -08:00
Brian Anderson
c2ffa3e916 Fix install target for new libraries 2012-11-07 14:05:45 -08:00
Brian Anderson
69a8b4d8e2 Rename src/rustc to src/librustc. Use the driver crate 2012-11-07 13:53:39 -08:00
Brian Anderson
84208b2d26 Librarify rusti, etc. 2012-11-04 17:14:52 -08:00
Brian Anderson
1b0c6665d9 Merge remote-tracking branch 'brson/repl'
Conflicts:
	mk/install.mk
	src/rt/rustrt.def.in
2012-11-04 13:42:39 -08:00
Daniel Patterson
6c79d78843 library-ifying of tools - turning cargo, rustdoc, fuzzer, into libraries, as per #3543 2012-11-03 18:23:43 -07:00
Zack Corr
ea996556b9 rusti: Remove linenoise module, add to rt, remove core::rl 2012-10-30 11:08:36 +10:00
Zack Corr
4912428cb5 rusti: Add linenoise, wrap into core::rl and add rusti REPL tool
Add Brian Leibig to AUTHORS.txt for REPL contributions
2012-10-27 18:03:15 +10:00
Niko Matsakis
d365ec5c7d kill old serialization code 2012-03-15 18:30:10 -04:00
Brian Anderson
4d4995fc60 build: Fix some deps in tools.mk 2012-03-09 22:56:53 -08:00
Niko Matsakis
fdddf8f9e1 put serializer into the build and encode full item paths 2012-02-10 20:48:28 -08:00
Brian Anderson
66e97a9b08 rustdoc: Add a crate file 2012-01-15 14:30:12 -08:00
Graydon Hoare
51a9274cf6 Add rustdoc to build. 2011-12-20 18:27:27 -08:00
Graydon Hoare
447414f007 Establish 'core' library separate from 'std'. 2011-12-06 12:13:04 -08:00
Graydon Hoare
d1fd7d49a7 Build infra and minor build-enabling bugfixes for cargo. 2011-12-01 11:31:29 -08:00
Niko Matsakis
9c00c62b08 fix makefiles, add option to ignore changes in makefiles 2011-11-29 12:51:09 -08:00
Niko Matsakis
9c12c7c7f5 basic builds function 2011-11-29 12:51:07 -08:00
Niko Matsakis
d0887996e5 get the dependencies right so that all target archs are built 2011-11-02 14:13:22 -07:00
Niko Matsakis
93781297bf enable building with different target arch 2011-11-02 14:13:22 -07:00
Brian Anderson
3a6f3cf275 Move compiletest to src/ and cleanup build rules 2011-10-02 17:28:59 -07:00