Commit graph

102 commits

Author SHA1 Message Date
Dmitry Promsky
87334fb05f Made 'make install' include libs for additional targets 2014-04-08 00:03:12 -07:00
Brian Anderson
cfb52a5d35 mk: Don't touch config.tmp or tmp/dist as root. Closes #13190
When running `make install` we are touching these files that can't
then be removed later.
2014-03-30 20:15:27 -07:00
Brian Anderson
21617190f2 mk: Restore DESTDIR 2014-03-28 20:55:45 -07:00
Brian Anderson
01d823b4de install: Verify that installed compiler runs
Another sanity check. Can be disabled in `install.sh` via `--disable-verify`
and `configure` with `--disable-verify-install`.
2014-03-28 15:50:32 -07:00
Brian Anderson
476f0e36f0 mk: Fix syntax error in installation target 2014-03-27 20:21:57 -07:00
Brian Anderson
92d0ec2ec7 install: name the bundled manifest 'manifest.in'. Cleanup
The installed manifest is a different file, so they should have
different names. This should prevent various wierd conflicts in the future.
2014-03-26 14:59:08 -07:00
Brian Anderson
ce1e48a52b install: Support --libdir and --mandir correctly
This adds a hack to rustc to make it find the library directory
regardless of whether it is named lib/lib64/lib32.
2014-03-25 23:57:39 -07:00
Brian Anderson
e509cd6e2b Revert "Revert "mk: Run 'make install' through install.sh""
This reverts commit d62163188a.

Conflicts:
	mk/install.mk
2014-03-25 21:35:10 -07:00
Brian Anderson
1f35f834be mk: Fix 'make install'. Closes #13128 2014-03-25 15:27:47 -07:00
Brian Anderson
9b7751761b mk: Simplify how prepare.mk, install.mk, and dist.mk deal with stages
The only stage that can be installed from is 2 everywhere but windows,
3 on windows.

Closes #12799
2014-03-19 22:51:12 -07:00
Brian Anderson
2b64cb294c Address review feedback 2014-02-16 17:36:43 -08:00
Brian Anderson
9cd96e4f02 mk: Base the install target on prepare.mk 2014-02-15 14:18:00 -08:00
Vadim Chugunov
b7651325eb Build compiler-rt and link it to all crates, similarly to morestack. 2014-02-11 15:59:59 -08:00
bors
1d80a9a0f6 auto merge of #11903 : alexcrichton/rust/android-test-deps, r=huonw
This changes android testing to upload *all* target crates rather than just a
select subset. This should unblock #11867 which is introducing a libglob
dependency in testing.
2014-01-29 01:06:41 -08:00
Alex Crichton
55280598a8 Fix android test deps
This changes android testing to upload *all* target crates rather than just a
select subset. This should unblock #11867 which is introducing a libglob
dependency in testing.
2014-01-29 00:16:32 -08:00
Alex Crichton
20d6a8e0af Add a missing backslash to a makefile
Closes #11874
2014-01-28 09:17:06 -08:00
Alex Crichton
2611483894 Refactor the build system for easily adding crates
Before this patch, if you wanted to add a crate to the build system you had to
change about 100 lines across 8 separate makefiles. This is highly error prone
and opaque to all but a few. This refactoring is targeted at consolidating this
effort so adding a new crate adds one line in one file in a way that everyone
can understand it.
2014-01-26 00:53:41 -08:00
Ted Horst
0d4c51e1d1 fix uninstall target with configurable rustlib directory 2014-01-10 13:45:41 -06:00
Jan Niklas Hasse
116773a4eb Make CFG_LIBDIR configurable. Fixes #5223 2014-01-07 17:51:15 +01:00
Jan Niklas Hasse
6abe0ef32e Make rustc's own lib directory configurable and change the default to rustlib. Fixes #3319 2014-01-05 12:06:20 +01:00
Alex Crichton
d830fcc6eb make: Add all the make support for lib{native,green}
This should now begin distribution of lib{green,native} in rlib/dylib format as
well as building them as part of the normal build process.
2013-12-24 19:59:52 -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
Alex Crichton
c6e934f447 *Actually* fix make install with rlibs
Turns out that we only want to install the target rlibs, not the host rlibs.
I had it backwards the first time, then mixed up the second time, but this time
should get it right.

There's no need for host rlib files because none of them are needed at runtime.
2013-12-01 06:58:46 -08:00
Alex Crichton
8b964bf349 Fix make install to install rlib files
It was only copying the host files, not the target rlib files.
2013-11-30 18:58:09 -08:00
Alex Crichton
9fbba7b2ee Statically link librustrt to libstd
This commit alters the build process of the compiler to build a static
librustrt.a instead of a dynamic version. This means that we can stop
distributing librustrt as well as default linking against it in the compiler.

This also means that if you attempt to build rust code without libstd, it will
no longer work if there are any landing pads in play. The reason for this is
that LLVM and rustc will emit calls to the various upcalls in librustrt used to
manage exception handling. In theory we could split librustrt into librustrt and
librustupcall. We would then distribute librustupcall and link to it for all
programs using landing pads, but I would rather see just one librustrt artifact
and simplify the build process.

The major benefit of doing this is that building a static rust library for use
in embedded situations all of a sudden just became a whole lot more feasible.

Closes #3361
2013-11-29 18:36:14 -08:00
Alex Crichton
e338a4154b Add generation of static libraries to rustc
This commit implements the support necessary for generating both intermediate
and result static rust libraries. This is an implementation of my thoughts in
https://mail.mozilla.org/pipermail/rust-dev/2013-November/006686.html.

When compiling a library, we still retain the "lib" option, although now there
are "rlib", "staticlib", and "dylib" as options for crate_type (and these are
stackable). The idea of "lib" is to generate the "compiler default" instead of
having too choose (although all are interchangeable). For now I have left the
"complier default" to be a dynamic library for size reasons.

Of the rust libraries, lib{std,extra,rustuv} will bootstrap with an
rlib/dylib pair, but lib{rustc,syntax,rustdoc,rustpkg} will only be built as a
dynamic object. I chose this for size reasons, but also because you're probably
not going to be embedding the rustc compiler anywhere any time soon.

Other than the options outlined above, there are a few defaults/preferences that
are now opinionated in the compiler:

* If both a .dylib and .rlib are found for a rust library, the compiler will
  prefer the .rlib variant. This is overridable via the -Z prefer-dynamic option
* If generating a "lib", the compiler will generate a dynamic library. This is
  overridable by explicitly saying what flavor you'd like (rlib, staticlib,
  dylib).
* If no options are passed to the command line, and no crate_type is found in
  the destination crate, then an executable is generated

With this change, you can successfully build a rust program with 0 dynamic
dependencies on rust libraries. There is still a dynamic dependency on
librustrt, but I plan on removing that in a subsequent commit.

This change includes no tests just yet. Our current testing
infrastructure/harnesses aren't very amenable to doing flavorful things with
linking, so I'm planning on adding a new mode of testing which I believe belongs
as a separate commit.

Closes #552
2013-11-29 18:36:13 -08:00
bors
9ec4c1851a auto merge of #10229 : brson/rust/warnings, r=thestinger
In Rust we don't like capital letters.
2013-11-02 00:51:12 -07:00
Brian Anderson
758af60334 Fix installation with DESTDIR 2013-11-01 20:23:22 -07:00
Brian Anderson
e9605dc0c9 Use consistent capitalization in makefile errors
In Rust we don't like capital letters.
2013-11-01 15:28:12 -07:00
Olivier Saut
a6cd20bff9 Fix missing parenthesis in a previous substitution '$(PREFIX_ROOT)' to '$(CFG_MANDIR' on 1c4a348b07 2013-10-31 11:33:02 +01:00
Heather
1c4a348b07 Correct prefix / CFG_PREFIX work in configure / install.mk 2013-10-29 16:22:57 -07:00
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
Igor Bukanov
47fff53597 rust / build: make install should use explicit permissions when creating directories
Closes #10046
2013-10-24 10:23:12 +02:00
Daniel Micay
7c92435f8f remove the rusti command
Closes #9818
Closes #9567
Closes #8924
Closes #8910
Closes #8392
Closes #7692
Closes #7499
Closes #7220
2013-10-16 22:54:38 -04:00
Tim Chevalier
a9dddbacde rust / build: Remove the rust tool
Sadly, there's a lack of resources for maintaining the `rust` tool,
and we decided in the 2013-10-08 Rust team meeting that it's better
to remove it altogether than to leave it in a broken state.

This deletion is without prejudice. If a person or people appear who
would like to maintain the tool, we will probably be happy to
resurrect it!

Closes #9775
2013-10-10 14:36:06 -07:00
Alex Crichton
7b24efd6f3 rustdoc: Out with the old, in with the new
Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng
suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.
2013-09-22 09:51:15 -07:00
Alex Crichton
876cb76f1b Add the rustdoc_ng binary to the makefile rules
Now rustdoc_ng will be built as both a binary and a library (using the same
rules as all the other binaries that rust has). Furthermore, this will also
start building rustdoc_ng unit tests (and running them).
2013-09-16 18:10:46 -07:00
Corey Richardson
268f3f0ff5 Add rustdoc_ng 2013-09-16 07:26:48 -04:00
Young-il Choi
492cbcee6d mk: install.mk fix to specify ADB variables not adb 2013-08-07 20:42:44 +09:00
bors
60d5bb9413 auto merge of #7796 : thomaslee/rust/issue-6247, r=z0w0
This closes #6247 by simply ensuring librustllvm.so gets installed to the target lib directory in addition to the host lib directory.
2013-07-14 23:40:19 -07:00
Tom Lee
27435c081f Install librustllvm.so to target lib directory 2013-07-14 21:53:47 -07:00
Ted Horst
f2ecf18a8e remove new man pages on make uninstall 2013-07-13 13:56:08 -05:00
bors
e95fcfafc7 auto merge of #7632 : gavinb/rust/7484_manpages, r=cmr
This patch updates the existing manpage and creates new pages for all of the rust command line tools. Closes #7484.
2013-07-11 07:37:36 -07:00
Felix S. Klock II
ace49442a6 Fix #3225: Incorporate feedback from Graydon.
This is a small follow-up fix to the previous commit: I needed
to quote the right-hand side of the definition for the variable
MATCHES, to handle the case where there are more than one previously
installed libraries in the target directory.
2013-07-09 15:31:43 +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
Gavin Baker
6143419ee1 Add new manpages to install script 2013-07-07 14:45:39 +10: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
d800147abb minor automatic whitespace fixes 2013-05-06 23:57:35 -04:00