Commit Graph

301 Commits

Author SHA1 Message Date
Brian Anderson 00f7776daa mk: Make nightlyism a configure option 2014-03-25 21:35:10 -07:00
Brian Anderson 6f9b30c6c1 configure: Make rustlibdir non-configurable
Trying to reduce the complexity of installation
2014-03-25 21:35:10 -07:00
bors 74bfa7108a auto merge of #12783 : adrientetar/rust/more-docs, r=alexcrichton
- remove `node.js` dep., it has no effect as of #12747 (1)
- switch between LaTeX compilers, some cleanups
- CSS: fixup the print stylesheet, refactor highlighting code (2)

(1): `prep.js` outputs its own HTML directives, which `pandoc` cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now).

Note that if we were to add the `.rust` class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate ([here is](http://adrientetar.github.io/rust-tuts/tutorial/tutorial.pdf) an example of that).

(2): the only real highlighting change is for lifetimes which are now brown instead of red, the rest is just refactor of twos shades of red that look the same.
Also I made numbers highlighting for src in rustdoc a tint more clear so that it is less bothering.

@alexcrichton, @huonw

Closes #9873. Closes #12788.
2014-03-11 12:36:58 -07:00
Brian Anderson 16ec0ab542 configure: Create the dist directory 2014-03-09 14:17:26 -07:00
Brian Anderson 99746d43c1 Bugfixes and cleanup to configure script 2014-03-09 14:17:26 -07:00
Adrien Tétar 9eadcacdd7 doc: have a real switch b/w LaTeX compilers 2014-03-09 18:44:59 +01:00
Adrien Tétar 862acedf51 doc: remove node.js dependency
`prep.js` outputs its own HTML directives, which `pandoc` cannot
recognize when converting the document into LaTeX (this is why the
PDF docs have never been highlighted as of now).

Note that if we were to add the `.rust` class to snippets, we could
probably use pandoc's native highlighting capatibilities i.e. Kate.
2014-03-09 13:45:36 +01:00
Gary M. Josack 7e85431775 Remove references to guide-conditions
std::condition was removed in 454882dcb7
but there are still links to the guide. Removing them.
2014-02-25 01:01:55 -08:00
Alex Crichton ea72398adf configure: Accept LLVM 3.5 for building rust
This is the current head of LLVM, and we can indeed build with 3.5
2014-02-20 18:07:08 -08:00
Brian Anderson 8d4b675ced mk: Address review feedback 2014-02-14 19:17:50 -08:00
Brian Anderson 334af011f0 mk: Improve build system help commands 2014-02-14 17:45:54 -08:00
Brian Anderson 94d2c8a21f mk: Remove the concept of 'snapshot transitions'
This way of doing snapshots hasn't been used since 2011.
2014-02-14 17:45:53 -08:00
Alex Crichton 8cd935f52a Upgrade LLVM
This upgrade brings commit by @eddyb to help optimizations of virtual calls in
a few places (https://github.com/llvm-mirror/llvm/commit/6d2bd95) as well as a
commit by @c-a to *greatly* improve the runtime of the optimization passes
(https://github.com/rust-lang/llvm/pull/3).

Nice work to these guys!
2014-01-29 23:43:39 -08:00
Alex Crichton e715cdba31 Allow opting-out of rpath usage
By default, the compiler and libraries are all still built with rpaths, but this
can be opted out of with --disable-rpath to ./configure or --no-rpath to rustc.

cc #5219
2014-01-24 09:24:45 -08:00
Alex Crichton 7a37294acc Add a configure to disable libstd version injection
We'll use this when building snapshots so we can upgrade freely, but all
compilers will inject a version by default.
2014-01-15 08:22:16 -08:00
bors dd8b011319 auto merge of #11521 : dguenther/rust/hide_libdir_relative, r=alexcrichton
Renamed `LIBDIR_RELATIVE` to `CFG_LIBDIR_RELATIVE`. It's not a configurable variable, but it looks out of place without the `CFG_` prefix.

Fixes #11420
2014-01-14 15:11:30 -08:00
Derek Guenther a599d897fc Renamed LIBDIR_RELATIVE to CFG_LIBDIR_RELATIVE 2014-01-14 15:52:57 -06:00
Alex Crichton 289ba105ae dox: Write a guide to the rust runtime 2014-01-13 23:22:07 -08:00
Alex Crichton f2a86a2da6 Register new snapshots 2014-01-09 09:18:59 -08:00
Brian Anderson 77ec04487b mk: Start testing the cheatsheet 2014-01-07 17:01:07 -08:00
bors aa1839bd69 auto merge of #11364 : brson/rust/docs, r=alexcrichton
This reorganizes the documentation index to be more focused on the in-tree docs, and to clean up the style, and it also adds @steveklabnik's pointer guide.
2014-01-07 15:46:38 -08:00
Jan Niklas Hasse 116773a4eb Make CFG_LIBDIR configurable. Fixes #5223 2014-01-07 17:51:15 +01:00
Jan Niklas Hasse 7b7d7a041a Remove trailing whitespace 2014-01-07 17:45:41 +01:00
Steve Klabnik 6f09d80f97 Add Pointer tutorial, rename borrowed pointer tutorial. 2014-01-06 19:37:26 -08:00
bors 4e622becdc auto merge of #11118 : jhasse/rust/patch-rustlibdir, r=alexcrichton
...stlib. Fixes #3319
2014-01-06 02:01:49 -08:00
Alan Andrade eeafee4c9b Convert sub tutorials into Guides #10838
Ensure configure creates doc/guides directory

Fix configure makefile and tests

Remove old guides dir and configure option, convert testing to guide

Remove ignored files

Fix submodule issue

prepend dir in makefile so that bor knows how to build the docs

S to uppercase
2014-01-05 22:48:19 -06: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
lyuts 172207487b Recognize LLVM 3.4 when building on opensuse with --llvm-root specified. 2014-01-01 16:46:29 -08:00
klutzy 1890290ded llvm: Disable pthread on mingw
llvm supports both win32 native threads and pthread,
but configure tries to find pthread first.
This manually disables pthread to use native api.

This removes libpthreads-2.dll dependency on librustc.
2013-12-18 09:48:58 +09:00
Carter Tazio Schonwald d952553048 provide an error at at configure time if gcc, and g++ point to a mixture of clang and gcc. Fixes issue #10959
Signed-off-by: Carter Tazio Schonwald <carter.schonwald@gmail.com>
2013-12-16 20:00:37 -05:00
Erick Tryzelaar 460a966a58 Use clang instead of gcc on OS X 10.9
Apple replaced gcc with clang, but kept around a stub gcc to call
clang. This adds a check in `configure` to detect when gcc is
really clang, and switch to using clang in this situation.

Closes #10811.
2013-12-14 16:11:48 -08:00
Erick Tryzelaar bea3ec34dd Remove tabs from configure script 2013-12-14 16:11:39 -08:00
Felix S. Klock II 5e00d5c790 Make the ccache-free case look like the ccache case.
This fixes a problem with `make check` clang -Werror failing due to an
unused -Llib arg.
2013-12-02 19:25:14 +01:00
bors 436adc2131 auto merge of #10731 : chris-morgan/rust/fix-double-slashing, r=metajack
CFG_BUILD_DIR, CFG_LLVM_SRC_DIR and CFG_SRC_DIR all have trailing
slashes, by definition, so this is correct.

(This is purely cosmetic; the doubled slash is ignored by all the tools we're using.)
2013-11-30 15:51:39 -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
Chris Morgan d3019af244 Fix double slashes in make paths.
CFG_BUILD_DIR, CFG_LLVM_SRC_DIR and CFG_SRC_DIR all have trailing
slashes, by definition, so this is correct.
2013-11-30 12:09:10 +11:00
klutzy 52c8c1daba llvm: Disable pthreads on mingw-w64 platforms 2013-11-24 19:15:08 +09:00
klutzy 11b6aed4a5 Fix --local-rust-root option on Windows 2013-11-21 12:32:03 +09:00
bors 2456272626 auto merge of #10222 : nibrahim/rust/docfix, r=brson
Earlier versions of pandoc don't have the `default.html5` template file. When `make docs` is run, the build process fails with this message.

    pandoc: doc/rust.html
    pandoc: /usr/share/pandoc-1.8.2.1/templates/default.html5: openFile: does not exist (No such file or directory)
    
    node.js:201
            throw e; // process.nextTick error, or 'error' event on first tick
                  ^
    Error: write EPIPE
        at errnoException (net.js:670:11)
        at Object.afterWrite [as oncomplete] (net.js:503:19)
    make: *** [doc/rust.html] Error 1
2013-11-01 20:46:18 -07:00
Noufal Ibrahim 60cb1fb4d1 Bump required pandoc version to 1.9.
Earlier versions of pandoc don't have the default.html5 and thus,
building the docs fail.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-11-02 02:08:43 +05:30
bors 8ea2123055 auto merge of #10220 : luqmana/rust/con, r=brson
Previously we were actually overwriting `CFG_{HOST,TARGET,BUILD}` with `CFG_{HOST,TARGET,BUILD}_TRIPLE(S)` since configure tested for the legacy one by checking if it was empty which would never be the case. That meant it wouldn't split up multiple triples and just treat it as one long triple.

This pull also fixes the rules that were changed when librustuv was added to use the right CFG_ vars and removes the legacy flags.
2013-11-01 12:46:21 -07:00
Luqman Aden d9decf30bd configure: Remove legacy triple flags. 2013-11-01 14:21:48 -04:00
bors fa8a202858 auto merge of #10203 : kud1ing/rust/ios, r=alexcrichton
This is based on the work by @dobkeratops, updated and extended to work for Xcode 5.

This gets you going. I will add separate PRs for compilation/linking fixes.
See also https://github.com/mozilla/rust/wiki/Doc-building-for-ios
2013-11-01 02:26:23 -07:00
Luqman Aden 12222f9825 configure: Fix passing multiple target and host triples. 2013-11-01 03:34:16 -04:00
Brian Anderson 424e91a47d Fix fallback configuration flags 2013-10-31 15:27:54 -07:00
kud1ing 5864ad9ab1 add target triple arm-apple-darwin 2013-10-31 22:43:59 +01:00
Heather b9504f9931 support for GNU configure syntax corrections: patch from brson 2013-10-29 16:22:57 -07: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 90911d7259 Remove jemalloc from the runtime
As discovered in #9925, it turns out that we weren't using jemalloc on most
platforms. Additionally, on some platforms we were using it incorrectly and
mismatching the libc version of malloc with the jemalloc version of malloc.

Additionally, it's not clear that using jemalloc is indeed a large performance
win in particular situtations. This could be due to building jemalloc
incorrectly, or possibly due to using jemalloc incorrectly, but it is unclear at
this time.

Until jemalloc can be confirmed to integrate correctly on all platforms and has
verifiable large performance wins on platforms as well, it shouldn't be part of
the default build process. It should still be available for use via the
LD_PRELOAD trick on various architectures, but using it as the default allocator
for everything would require guaranteeing that it works in all situtations,
which it currently doesn't.

Closes #9925
2013-10-18 10:38:21 -07:00