Commit Graph

1263 Commits

Author SHA1 Message Date
bors 828ffab627 auto merge of #13726 : michaelwoerister/rust/lldb-autotests, r=alexcrichton
This pull request contains preparations for adding LLDB autotests:
+ the debuginfo tests are split into debuginfo-gdb and debuginfo-lldb
  + the `compiletest` tool is updated to support the debuginfo-lldb mode
  + tests.mk is modified to provide debuginfo-gdb and debuginfo-lldb make targets
  + GDB test cases are moved from `src/test/debug-info` to `src/test/debuginfo-gdb`
+ configure will now look for LLDB and set the appropriate CFG variables
+ the `lldb_batchmode.py` script is added to `src/etc`. It emulates GDB's batch mode

The LLDB autotests themselves are not part of this PR. Those will probable require some manual work on the test bots to make them work for the first time. Better to get these unproblematic preliminaries out of the way in a separate step.
2014-05-07 13:26:41 -07:00
bors 87115fd001 auto merge of #13901 : alexcrichton/rust/facade, r=brson
This is the second step in implementing #13851. This PR cannot currently land until a snapshot exists with #13892, but I imagine that this review will take longer.

This PR refactors a large amount of functionality outside of the standard library into a new library, libcore. This new library has 0 dependencies (in theory). In practice, this library currently depends on these symbols being available:

* `rust_begin_unwind` and `rust_fail_bounds_check` - These are the two entry points of failure in libcore. The symbols are provided by libstd currently. In the future (see the bullets on #13851) this will be officially supported with nice error mesages. Additionally, there will only be one failure entry point once `std::fmt` migrates to libcore.
* `memcpy` - This is often generated by LLVM. This is also quite trivial to implement for any platform, so I'm not too worried about this.
* `memcmp` - This is required for comparing strings. This function is quite common *everywhere*, so I don't feel to bad about relying on a consumer of libcore to define it.
* `malloc` and `free` - This is quite unfortunate, and is a temporary stopgap until we deal with the `~` situation. More details can be found in the module `core::should_not_exist`
* `fmod` and `fmodf` - These exist because the `Rem` trait is defined in libcore, so the `Rem` implementation for floats must also be defined in libcore. I imagine that any platform using floating-point modulus will have these symbols anyway, and otherwise they will be optimized out.
* `fdim` and `fdimf` - Like `fmod`, these are from the `Signed` trait being defined in libcore. I don't expect this to be much of a problem

These dependencies all "Just Work" for now because libcore only exists as an rlib, not as a dylib.

The commits themselves are organized to show that the overall diff of this extraction is not all that large. Most modules were able to be moved with very few modifications. The primary module left out of this iteration is `std::fmt`. I plan on migrating the `fmt` module to libcore, but I chose to not do so at this time because it had implications on the `Writer` trait that I wanted to deal with in isolation. There are a few breaking changes in these commits, but they are fairly minor, and are all labeled with `[breaking-change]`.

The nastiest parts of this movement come up with `~[T]` and `~str` being language-defined types today. I believe that much of this nastiness will get better over time as we migrate towards `Vec<T>` and `Str` (or whatever the types will be named). There will likely always be some extension traits, but the situation won't be as bad as it is today.

Known deficiencies:

* rustdoc will get worse in terms of readability. This is the next issue I will tackle as part of #13851. If others think that the rustdoc change should happen first, I can also table this to fix rustdoc first.
* The compiler reveals that all these types are reexports via error messages like `core::option::Option`. This is filed as #13065, and I believe that issue would have a higher priority now. I do not currently plan on fixing that as part of #13851. If others believe that this issue should be fixed, I can also place it on the roadmap for #13851.

I recommend viewing these changes on a commit-by-commit basis. The overall change is likely too overwhelming to take in.
2014-05-07 11:06:45 -07:00
Michael Woerister 55a8bd56e5 debuginfo: Split debuginfo autotests into debuginfo-gdb and debuginfo-lldb 2014-05-07 19:58:07 +02:00
Alex Crichton 836d4b96a9 mk: Add libcore 2014-05-07 08:12:48 -07:00
bors 445988b478 auto merge of #13832 : alexcrichton/rust/cfail-full, r=brson
Compile-fail tests for syntax extensions belong in this suite which has correct
dependencies on all artifacts rather than just the target artifacts.

Closes #13818
2014-05-07 08:11:52 -07:00
bors 4a5d39001b auto merge of #13914 : alexcrichton/rust/pile-o-rustdoc-fixes, r=brson
Lots of assorted things here and there, all the details are in the commits.

Closes #11712
2014-05-07 03:21:47 -07:00
Luqman Aden feb2be6bd1 Lower armhf target feature to v6. 2014-05-06 02:05:05 -04:00
Alex Crichton 15856139e4 rustdoc: Enable the footnote markdown extension
This enables hoedown's footnote extension, and fixes all footnotes in the
reference manual to use the new syntax.
2014-05-03 17:36:20 -07:00
Alex Crichton 9306e840f5 rustdoc: Migrate from sundown to hoedown
This primary fix brought on by this upgrade is the proper matching of the ```
and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a
bundled repository.

Additionally, hoedown is stricter about code blocks, so this ended up fixing a
lot of invalid code blocks (ending with " ```" instead of "```", or ending with
"~~~~" instead of "~~~").

Closes #12776
2014-05-03 17:36:20 -07:00
Alex Crichton 1547caf748 rustdoc: Fix inclusion of the new fonts
These fonts were moved into place by rust's makefiles, but rustdoc is widely
used outside of rustc itself. This moves the fonts into the rustdoc binary,
similarly to the other static assets, and writes them to the output location
whenever rustdoc generates documentation.

Closes #13593
Closes #13787
2014-05-03 02:09:29 -07:00
Felix S. Klock II b7374182f7 Add a `graphviz` crate for making .dot files to layout and render graphs. 2014-05-02 17:45:09 +02:00
Alex Crichton 7b3650da7a mk: Depend on regex_macros for tests appropriately
There is currently not much precedent for target crates requiring syntax
extensions to compile their test versions. This dependency is possible, but
can't be encoded through the normal means of DEPS_regex because it is a
test-only dependency and it must be a *host* dependency (it's a syntax
extension).

Closes #13844
2014-04-29 08:55:40 -07:00
Alex Crichton 7b2a89fa75 test: Add a compile-fail-fulldeps test suite
Compile-fail tests for syntax extensions belong in this suite which has correct
dependencies on all artifacts rather than just the target artifacts.

Closes #13818
2014-04-28 17:31:43 -07:00
bors 395d8857d6 auto merge of #13744 : adrientetar/rust/derp, r=brson
- Serve webfonts locally
- Style changes around `blockquote` and `code`
- Minor adjustments from previous changes

Bringing back updated examples: [modified tutorial](http://adrientetar.legtux.org/cached/rust-docs/tutorial.htm) and [modified manual](http://adrientetar.legtux.org/cached/rust-docs/manual.htm).
And for rustdoc, [modified `enum.FileType`](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm), [modified `std`](http://adrientetar.legtux.org/cached/rust-docs/std.htm) and [modified `std::io`](http://adrientetar.legtux.org/cached/rust-docs/io.htm).
2014-04-25 18:26:33 -07:00
Adrien Tétar c9d995d384 doc,rustdoc: store webfonts locally
- Avoids cross-domain requests restrictions
- Better availability of content
- No HTML queries needed for an offline build
2014-04-25 17:05:56 +09:00
Andrew Gallant 09a8b38550 mk: Copy fewer libraries into the host artifacts 2014-04-25 00:31:29 -04:00
Andrew Gallant b8b7484703 Add a regex crate to the Rust distribution.
Also adds a regex_macros crate, which provides natively compiled
regular expressions with a syntax extension.

Closes #3591.

RFC: 0007-regexps
2014-04-25 00:27:24 -04:00
bors 07aef98a32 auto merge of #13584 : rcxdude/rust/cross-syntax-ext, r=alexcrichton
This allows the use of syntax extensions when cross-compiling (fixing #12102). It does this by encoding the target triple in the crate metadata and checking it when searching for files. Currently the crate triple must match the host triple when there is a macro_registrar_fn, it must match the target triple when linking, and can match either when only macro_rules! macros are used.

due to carelessness, this is pretty much a duplicate of https://github.com/mozilla/rust/pull/13450.
2014-04-23 13:11:37 -07:00
Douglas Young 4ac89cd276 Enable use of syntax extensions when cross compiling.
This adds the target triple to the crate metadata.
When searching for a crate the phase (link, syntax) is taken into account.
During link phase only crates matching the target triple are considered.
During syntax phase, either the target or host triple will be accepted, unless
the crate defines a macro_registrar, in which case only the host triple will
match.
2014-04-23 20:33:54 +01:00
Vadim Chugunov 6619134d49 Upgrade compiler-rt 2014-04-22 15:50:51 -07:00
Alex Crichton 80bd176432 mk: Pass exact compile to rustc on cross compiles
Instead of passing through CC which may have things like ccache and other
arguments (when using clang) this commit filters out the necessary arguments
from CC to pass the right linker to rustc.

Closes #13562
2014-04-19 13:18:25 -07:00
bors 9b7cfd3c72 auto merge of #13513 : alexcrichton/rust/up-llvm, r=brson
This is a bit of an interesting upgrade to LLVM. Upstream LLVM has started using C++11 features, so they require a C++11 compiler to build. I've updated all the bots to have a C++11 compiler, and they appear to be building LLVM successfully:

* Linux bots - I added gcc/g++ 4.7 (good enough)
* Android bots - same as the linux ones
* Mac bots - I installed the most recent command line tools for Lion which gives us clang 3.2, but LLVM wouldn't build unless it was explicitly asked to link to `libc++` instead of `libstdc++`. This involved tweaking `mklldeps.py` and the `configure` script to get things to work out
* Windows bots - mingw-w64 has gcc 4.8.1 which is sufficient for building LLVM (hurray!)
* BSD bots - I updated FreeBSD to 10.0 which brought with it a relevant version of clang.

The largest fallout I've seen so far is that the test suite doesn't work at all on FreeBSD 10. We've already stopped gating on FreeBSD due to #13427 (we used to be on freebsd 9), so I don't think this puts us in too bad of a situation. I will continue to attempt to fix FreeBSD and the breakage on there.

The LLVM update brings with it all of the recently upstreamed LLVM patches. We only have one local patch now which is just an optimization, and isn't required to use upstream LLVM. I want to maintain compatibility with LLVM 3.3 and 3.4 while we can, and this upgrade is keeping us up to date with the 3.5 release. Once 3.5 is release we will in theory no longer require a bundled LLVM.
2014-04-18 17:11:32 -07:00
Alex Crichton acdee8b904 llvm: Add an option to statically link libstdc++
The goal of the snapshot bots is to produce binaries which can run in as many
locations as possible. Currently we build on Centos 6 for this reason, but with
LLVM's update to C++11, this reduces the number of platforms that we could
possibly run on.

This adds a --enable-llvm-static-stdcpp option to the ./configure script for
Rust which will enable building a librustc with a static dependence on
libstdc++. This normally isn't necessary, but this option can be used on the
snapshot builders in order to continue to make binaries which should be able to
run in as many locations as possible.
2014-04-17 11:39:51 -07:00
Richard Diamond 37096730fb mk/tests.mk: Fix a typo causing make to give compiletest the wrong rt build dir (target instead of host). 2014-04-17 13:04:41 -05:00
Alex Crichton efec34a95a mk: Change windows to install from stage2
In the past, windows was installed from stage3 to guarantee convergence between
the host and target artifacts, but syntax extensions on all platforms are
currently relying on convergence, so special casing this one platform has become
less relevant over time.

This will also have the added benefit of dealing with #13474 and #13491. These
issues will be closed after next next nightly is confirmed to fix them.
2014-04-15 19:45:00 -07:00
Brian Anderson 8f3c2a6ffd dist: Make Windows installer uninstall first. Closes #9563
This will remove existing files before installing new ones. Note
that I took some code with no license from stackoverflow, as
indicated in comments.
2014-04-15 19:45:00 -07:00
bors 8a4ffbf625 auto merge of #13416 : brson/rust/30min, r=alexcrichton
This is intended to be the first thing somebody new to the language reads about Rust. It is supposed to be simple and intriguing, to give the user an idea of whether Rust is appropriate for them, and to hint that there's a lot of cool stuff to learn if they just keep diving deeper.

I'm particularly happy with the sequence of concurrency examples.
2014-04-15 06:02:06 -07:00
Alex Crichton c60d9ad57c mk: Fix rpath on cross compile builds
After removing absolute rpaths, cross compile builds (notably the nightly
builders) broke. This is because the RPATH was pointing at an empty directory
because only the rustc binary is copied over, not all of the target libraries.
This modifies the cross compile logic to fixup the rpath of the stage0
cross-compiled rustc to point to where it came from.
2014-04-11 11:16:10 -07:00
Alex Crichton ec996737fe rustc: Remove absolute rpaths
Concerns have been raised about using absolute rpaths in #11746, and this is the
first step towards not relying on rpaths at all. The only current use case for
an absolute rpath is when a non-installed rust builds an executable that then
moves from is built location. The relative rpath back to libstd and absolute
rpath to the installation directory still remain (CFG_PREFIX).

Closes #11746
Rebasing of #12754
2014-04-10 15:22:00 -07:00
Kang Seonghoon dd00bf3791 mk: Add a dummy CFG_COMPILER_HOST_TRIPLE to rustdoc invocation.
Otherwise it will prohibit `make compiler-docs` on Windows.
2014-04-10 15:21:59 -07:00
Brian Anderson ad66f56afd doc: Add "A 30-minute Introduction to Rust"
By Steve Klabnik.
2014-04-09 17:43:26 -07:00
Dmitry Promsky 87334fb05f Made 'make install' include libs for additional targets 2014-04-08 00:03:12 -07:00
Brian Anderson 0e85e599db mk: Pass the name of the make command to maketest.py
This should make BSD use the proper GNU make.
2014-04-06 15:55:43 -07:00
Brian Anderson 072a920503 Remove check-fast. Closes #4193, #8844, #6330, #7416 2014-04-06 15:55:43 -07:00
bors f1f50565a1 auto merge of #13315 : alexcrichton/rust/libc, r=alexcrichton,me
Rebasing of #12526 with a very obscure bug fixed on windows.
2014-04-06 02:56:39 -07:00
bors 0651d2790c auto merge of #13260 : pnkfelix/rust/fsk-fix-13247, r=alexcrichton
Fix #13247.

r? @alexcrichton  (or anyone else, really).
2014-04-05 14:51:32 -07:00
Felix S. Klock II 4edf7b8c34 Fix android problems with newly fixed rpass-full variable definition.
First, documented the existing `CTEST_DISABLE_$(TEST_GROUP)` pattern
for conditionally disabling tests based on missing host features.

Added variant of above, `CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP)`,
which is only queried in contexts where the target is not on the
CFG_HOST list (which I interpret as the list of targets that our host
can compatibly emulate; e.g. the example that i686 and x86_64 can in
theory run each others' tests).

Driveby fix: Remove redundant copy of
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec dependency declaration.
2014-04-05 21:40:36 +02:00
Huon Wilson b236f45e35 Add stdlib docs to the Linux binary tarball.
These are not installed anywhere, but are included under `./doc` for
those who want an offline copy with their nightlies. This increases the
size of the (compressed) tarball from 76 to 83 MB.
2014-04-04 13:23:00 -07:00
Corey Richardson 0459ee77d0 Fix fallout from std::libc separation 2014-04-04 09:31:44 -07:00
bors 540c2a2a27 auto merge of #13255 : alexcrichton/rust/issue-5605, r=huonw
These syntax extensions need a place to be documented, and this starts passing a
`--cfg dox` parameter to `rustdoc` when building and testing documentation in
order to document macros so that they have no effect on the compiled crate, but
only documentation.

Closes #5605
2014-04-04 01:01:51 -07:00
Brian Anderson 0875ffcbff Bump version to 0.11-pre
This also changes some of the download links in the documentation
to 'nightly'.
2014-04-03 16:28:46 -07:00
Alex Crichton 78937b9779 std: Document builtin syntax extensions
These syntax extensions need a place to be documented, and this starts passing a
`--cfg dox` parameter to `rustdoc` when building and testing documentation in
order to document macros so that they have no effect on the compiled crate, but
only documentation.

Closes #5605
2014-04-03 16:17:48 -07:00
Felix S. Klock II 3cbd98e43f Two fixes to get `make check-stage1` working.
1. Fix a long-standing typo in the makefile: the relevant
   CTEST_NAME here is `rpass-full` (with a dash), not
   `rpass_full`.

2. The rpass-full tests depend on the complete set of target
   libraries.  Therefore, the rpass-full tests need to use
   the dependencies held in the CSREQ-prefixed variable, not
   the TLIBRUSTC_DEFAULT-prefixed variable.
2014-04-02 11:47:19 +02:00
Alex Crichton a5681d2590 Bump version to 0.10 2014-03-31 14:40:44 -07:00
Brian Anderson d2686c751a mk: Workaround distcheck failure on mac. #13224
Mac can't actually build our source tarballs because it's `tar`
command doesn't support the --exclude-vcs flag. This is just
a workaround to make our mac nightlies work (we get our source
tarballs from the linux bot).
2014-03-31 00:10:13 -07:00
Brian Anderson 84e9c0692a mk: distcheck --uninstall 2014-03-30 21:23:43 -07:00
Brian Anderson 45f2d83d3c dist: Add libbacktrace to source tarballs 2014-03-30 21:13:25 -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 4aa7a8a5c8 mk: Fix 'make dist' on Mac 2014-03-30 19:14:39 -07:00
bors 02d186ad9b auto merge of #13185 : alexcrichton/rust/osx-pkg, r=brson
This performs a few touch-ups to the OSX installer:

* A rust logo is shown during installation
* The installation happens to /usr/local by default (instead of /)
* A new welcome screen is shown that's slightly more relevant
2014-03-29 01:41:42 -07:00
bors 8610e4a7a0 auto merge of #13168 : jankobler/rust/verify-grammar-02, r=brson
This fixes some problems  with

     make verify-grammar

llnextgen still reports a lot of errors

FYI: My build directory /my-test/build is different from the source directory /my-test/rust.
cd  /my-test/build
/my-test/rust/configure --prefix=/my-test/bin
make
make install
make verify-grammar
2014-03-28 23:01:43 -07:00
Brian Anderson 21617190f2 mk: Restore DESTDIR 2014-03-28 20:55:45 -07:00
Alex Crichton bec333c4bc dist: Tweak the OSX pkg installer
This performs a few touch-ups to the OSX installer:

* A rust logo is shown during installation
* The installation happens to /usr/local by default (instead of /)
* A new welcome screen is shown that's slightly more relevant
2014-03-28 18:29:29 -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
bors 22a04ce286 auto merge of #13174 : brson/rust/dist, r=alexcrichton,huonw 2014-03-27 21:21:56 -07:00
Brian Anderson 476f0e36f0 mk: Fix syntax error in installation target 2014-03-27 20:21:57 -07:00
bors 29436d54ee auto merge of #13142 : alexcrichton/rust/issue-13118, r=brson
The previous dependency calculation was based on an arbitrary set of asterisks
at an arbitrary depth, but using the recursive version should be much more
robust in figuring out what's dependent.
2014-03-27 17:11:58 -07:00
Brian Anderson 080d2104ff mk: Always touch libuv.a
libuv.a always looks out of date to the makefile, causing make to
always descend into the libuv makefile, even when there's nothing
to build.
2014-03-27 14:29:07 -07:00
Jan Kobler e91115feed verify-grammar path to rust.md
When calling

   make verify-grammar

rust.md cannot be found, because the
path to rust.md is missing.

The path is set to:

   $(D)/rust.md

This can only be tested, when llnextgen is installed.

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-03-27 10:20:30 +01:00
Brian Anderson 0f4f786b62 mk: Use 'find' invocation that works on mac 2014-03-26 21:28:56 -07:00
Brian Anderson c060e2e515 install: Don't allow installation over the install files 2014-03-26 18:52:23 -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 380fe976c8 mk: Fix deps for prepare host tools 2014-03-25 21:35:10 -07:00
Brian Anderson 00f7776daa mk: Make nightlyism a configure option 2014-03-25 21:35:10 -07:00
Brian Anderson d252539990 mk: Rename CFG_COMPILER to CFG_COMPILER_HOST_TRIPLE
Much clearer
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
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 ff17b7c099 mk: Remove leading './' from manifest entries 2014-03-25 21:35:10 -07:00
Alex Crichton 47093648a7 mk: Use rwildcard to calculate dependent files
The previous dependency calculation was based on an arbitrary set of asterisks
at an arbitrary depth, but using the recursive version should be much more
robust in figuring out what's dependent.

Closes #13118
2014-03-25 15:50:36 -07:00
Brian Anderson 1f35f834be mk: Fix 'make install'. Closes #13128 2014-03-25 15:27:47 -07:00
Brian Anderson 39b48fb883 mk: Make distcheck depend on dist-docs 2014-03-24 14:29:23 -07:00
Brian Anderson d62163188a Revert "mk: Run 'make install' through install.sh"
This reverts commit e93709a911637194835268420e67d768ee19b5df.
2014-03-24 14:29:22 -07:00
Brian Anderson c796f89dbc mk: Fix prepare.mk
The way it was formulated you could only 'prepare' one directory per build.
2014-03-24 14:29:20 -07:00
Brian Anderson 70a10758de mk: Fix a minor UI bug 2014-03-24 14:29:19 -07:00
Brian Anderson a2e8e30b11 mk: Don't rm 'dist' during clean, just its contents
This is not for temporaries now
2014-03-24 14:29:19 -07:00
Brian Anderson ba98689f09 mk: Remove some debug logging 2014-03-24 14:29:19 -07:00
Brian Anderson 169f08dd59 mk: Cleanup dist.mk yet more 2014-03-24 14:29:18 -07:00
Brian Anderson c2e5e62135 mk: Fix some dist deps for parallel builds 2014-03-24 14:29:18 -07:00
Brian Anderson 8694c28762 mk: Run 'make install' through install.sh 2014-03-24 14:29:17 -07:00
Brian Anderson 805d0e53fd mk: Fix location of man pages in prepare.mk 2014-03-24 14:29:17 -07:00
Brian Anderson b8138e0cf2 mk: Wire up everything to dist and distcheck
Fix some misc bugs
2014-03-24 14:29:17 -07:00
Brian Anderson dd7a60e0c3 mk: Fix distcheck
Also, add more distcheck tests
2014-03-24 14:29:17 -07:00
Brian Anderson ae0e47a6eb mk: Add FIXME about making windows installer support all hosts 2014-03-24 14:29:17 -07:00
Brian Anderson 116ebe5af8 mk: Add docs to dist prep
For integrating doc upload into the dist-snap process
2014-03-24 14:29:16 -07:00
Brian Anderson 44842db533 mk: Cleanup version handling and add support for nightly dists 2014-03-24 14:29:16 -07:00
Brian Anderson 669a0554da mk: Make OS X .pkg for all arches 2014-03-24 14:29:16 -07:00
Brian Anderson 4176cf47df mk: Cleanup 2014-03-24 14:29:15 -07:00
Brian Anderson df141e624d mk: Reorder definitions in dist.mk
Just to be more logical, put big headers between different installers
2014-03-24 14:29:15 -07:00
Brian Anderson e30ab71e08 mk: Stop building OS X .pkg as part of 'make dist'
This doesn't work quite right yet (we need to build packages for all hosts)
and I'm not ready to turn on new dist artifacts yet, but I want to start doing
dry runs for 0.10, so I'm turning this off for now.
2014-03-24 14:29:15 -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
bors d956975e7d auto merge of #12899 : brson/rust/cleanbacktrace, r=alexcrichton
After `make clean` I'm seeing the build break with

```
cp: cannot stat ‘x86_64-unknown-linux-gnu/rt/libbacktrace/.libs/libbacktrace.a’: No such file or directory
```

Deleteing the libbacktrace dir entirely on clean fixes.
2014-03-16 01:36:21 -07:00
Alex Crichton 0015cab1fd Test fixes and rebase conflicts
This commit switches over the backtrace infrastructure from piggy-backing off
the RUST_LOG environment variable to using the RUST_BACKTRACE environment
variable (logging is now disabled in libstd).
2014-03-15 22:56:46 -07:00
Alex Crichton cc6ec8df95 log: Introduce liblog, the old std::logging
This commit moves all logging out of the standard library into an external
crate. This crate is the new crate which is responsible for all logging macros
and logging implementation. A few reasons for this change are:

* The crate map has always been a bit of a code smell among rust programs. It
  has difficulty being loaded on almost all platforms, and it's used almost
  exclusively for logging and only logging. Removing the crate map is one of the
  end goals of this movement.

* The compiler has a fair bit of special support for logging. It has the
  __log_level() expression as well as generating a global word per module
  specifying the log level. This is unfairly favoring the built-in logging
  system, and is much better done purely in libraries instead of the compiler
  itself.

* Initialization of logging is much easier to do if there is no reliance on a
  magical crate map being available to set module log levels.

* If the logging library can be written outside of the standard library, there's
  no reason that it shouldn't be. It's likely that we're not going to build the
  highest quality logging library of all time, so third-party libraries should
  be able to provide just as high-quality logging systems as the default one
  provided in the rust distribution.

With a migration such as this, the change does not come for free. There are some
subtle changes in the behavior of liblog vs the previous logging macros:

* The core change of this migration is that there is no longer a physical
  log-level per module. This concept is still emulated (it is quite useful), but
  there is now only a global log level, not a local one. This global log level
  is a reflection of the maximum of all log levels specified. The previously
  generated logging code looked like:

    if specified_level <= __module_log_level() {
        println!(...)
    }

  The newly generated code looks like:

    if specified_level <= ::log::LOG_LEVEL {
        if ::log::module_enabled(module_path!()) {
            println!(...)
        }
    }

  Notably, the first layer of checking is still intended to be "super fast" in
  that it's just a load of a global word and a compare. The second layer of
  checking is executed to determine if the current module does indeed have
  logging turned on.

  This means that if any module has a debug log level turned on, all modules
  with debug log levels get a little bit slower (they all do more expensive
  dynamic checks to determine if they're turned on or not).

  Semantically, this migration brings no change in this respect, but
  runtime-wise, this will have a perf impact on some code.

* A `RUST_LOG=::help` directive will no longer print out a list of all modules
  that can be logged. This is because the crate map will no longer specify the
  log levels of all modules, so the list of modules is not known. Additionally,
  warnings can no longer be provided if a malformed logging directive was
  supplied.

The new "hello world" for logging looks like:

    #[phase(syntax, link)]
    extern crate log;

    fn main() {
        debug!("Hello, world!");
    }
2014-03-15 22:26:36 -07:00
Brian Anderson 94078f750a mk: Clean libbacktrace w/ gusto
After `make clean' I'm seeing the build break with

```
cp: cannot stat ‘x86_64-unknown-linux-gnu/rt/libbacktrace/.libs/libbacktrace.a’: No such file or directory
```

Deleteing the libbacktrace dir entirely on clean fixes.
2014-03-15 17:48:04 -07:00
bors fc7a112808 auto merge of #12896 : alexcrichton/rust/goodbye-extra, r=brson
This commit shreds all remnants of libextra from the compiler and standard
distribution. Two modules, c_vec/tempfile, were moved into libstd after some
cleanup, and the other modules were moved to separate crates as seen fit.

Closes #8784
Closes #12413
Closes #12576
2014-03-14 23:11:31 -07:00
Huon Wilson 3d6c28acd0 docs: begin a "low-level & unsafe code" guide.
This aims to cover the basics of writing safe unsafe code. At the moment
it is just designed to be a better place for the `asm!()` docs than the
detailed release notes wiki page, and I took the time to write up some
other things.

More examples are needed, especially of things that can subtly go wrong;
and vast areas of `unsafe`-ty aren't covered, e.g. `static mut`s and
thread-safety in general.
2014-03-15 13:51:53 +11:00
Alex Crichton 58e4ab2b33 extra: Put the nail in the coffin, delete libextra
This commit shreds all remnants of libextra from the compiler and standard
distribution. Two modules, c_vec/tempfile, were moved into libstd after some
cleanup, and the other modules were moved to separate crates as seen fit.

Closes #8784
Closes #12413
Closes #12576
2014-03-14 13:59:02 -07:00
bors 6ca57736cc auto merge of #12852 : itdaniher/rust/master, r=alexcrichton
This enables the lowering of llvm 64b intrinsics to hardware ops, resolving issues around `__kernel_cmpxchg64` on older kernels on ARM devices, and also enables use of the hardware floating point unit, resolving https://github.com/mozilla/rust/issues/10482.
2014-03-13 08:26:40 -07:00
bors 12b2607572 auto merge of #12602 : alexcrichton/rust/backtrace, r=brson
Whenever a failure happens, if a program is run with
`RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr
handle. Stack traces are uncondtionally printed on double-failure and
rtabort!().

This ended up having a nontrivial implementation, and here's some highlights of
it:

* We're bundling libbacktrace for everything but OSX and Windows
* We use libgcc_s and its libunwind apis to get a backtrace of instruction
  pointers
* On OSX we use dladdr() to go from an instruction pointer to a symbol
* On unix that isn't OSX, we use libbacktrace to get symbols
* Windows, as usual, has an entirely separate implementation

Lots more fun details and comments can be found in the source itself.

Closes #10128
2014-03-13 01:11:39 -07:00