Commit Graph

1735 Commits

Author SHA1 Message Date
bors
391e0106ef auto merge of #20802 : huonw/rust/book-css, r=steveklabnik
There is likely to be new users with the alpha release, and there are a lot of documents on the internet (StackOverflow, reddit, blogs) that refer to these guides, so emitting a more helpful error than "404" is nice. Hence, I've temporarily reinstated stub documents for each of the old guides, referring to as relevant a part of the book as possible.

Also, rustbook was silently ignoring some errors, which lead to an inconsistency with directory creation/file writing. This meant the CSS file was not being written if no `doc` directory existed in the users build dir (e.g. the buildbots). This should mean that the CSS will appear automatically in later builds.
2015-01-10 05:55:07 +00:00
bors
87ed884a9c Merge pull request #20699 from vhbit/ios-archs
Better iOS support

Reviewed-by: alexcrichton
2015-01-09 17:35:09 +00:00
Valerii Hiora
577d0dbcb8 iOS: preliminary 64-bit archs support 2015-01-09 18:38:30 +02:00
Valerii Hiora
a945f288ff iOS: makefiles and runtime for new archs 2015-01-09 18:38:30 +02:00
Huon Wilson
6fc0ac5ee3 Ensure that the book is built after the doc/ directory.
Without this, rustbook was failing because it was expecting the
directory to exist. (Previously, rustbook was just silently failing to
install the CSS files due to this.)
2015-01-09 20:26:31 +11:00
Huon Wilson
4247a30bdd Add stub deprecation files for each of the old guides.
There are hundreds of stackoverflow answers, reddit posts and blog
articles that link to these documents, so it's a nicer user experience
if they're not plain 404s.

The intention is to let these hang around only for relatively short
while. The alpha is likely to bring in many new users and they will be
reading the documents mentioned above.
2015-01-09 19:47:09 +11:00
bors
32545a0460 Merge pull request #20779 from brson/prerel
mk: Update prerelase versioning to conform to semver

Reviewed-by: alexcrichton
2015-01-09 01:19:54 +00:00
Brian Anderson
44a287e6eb mk: Add rustbook to source dist 2015-01-08 17:03:40 -08:00
Brian Anderson
1f550b47c2 mk: Update prerelase versioning to conform to semver 2015-01-08 15:33:31 -08:00
Alex Crichton
7541f82fab Fix dead links in the guide and reorganize 2015-01-08 10:27:03 -08:00
Steve Klabnik
16a6ebd1f6 "The Rust Programming Language"
This pulls all of our long-form documentation into a single document,
nicknamed "the book" and formally titled "The Rust Programming
Language."

A few things motivated this change:

* People knew of The Guide, but not the individual Guides. This merges
  them together, helping discoverability.
* You can get all of Rust's longform documentation in one place, which
  is nice.
* We now have rustbook in-tree, which can generate this kind of
  documentation. While its style is basic, the general idea is much
  better: a table of contents on the left-hand side.
* Rather than a almost 10,000-line guide.md, there are now smaller files
  per section.
2015-01-08 12:02:11 -05:00
Alex Crichton
a6bf7676a5 rollup merge of #20716: brson/RUST_DEBUG 2015-01-07 17:18:08 -08:00
Brian Anderson
c27133e2ce Preliminary feature staging
This partially implements the feature staging described in the
[release channel RFC][rc]. It does not yet fully conform to the RFC as
written, but does accomplish its goals sufficiently for the 1.0 alpha
release.

It has three primary user-visible effects:

* On the nightly channel, use of unstable APIs generates a warning.
* On the beta channel, use of unstable APIs generates a warning.
* On the beta channel, use of feature gates generates a warning.

Code that does not trigger these warnings is considered 'stable',
modulo pre-1.0 bugs.

Disabling the warnings for unstable APIs continues to be done in the
existing (i.e. old) style, via `#[allow(...)]`, not that specified in
the RFC. I deem this marginally acceptable since any code that must do
this is not using the stable dialect of Rust.

Use of feature gates is itself gated with the new 'unstable_features'
lint, on nightly set to 'allow', and on beta 'warn'.

The attribute scheme used here corresponds to an older version of the
RFC, with the `#[staged_api]` crate attribute toggling the staging
behavior of the stability attributes, but the user impact is only
in-tree so I'm not concerned about having to make design changes later
(and I may ultimately prefer the scheme here after all, with the
`#[staged_api]` crate attribute).

Since the Rust codebase itself makes use of unstable features the
compiler and build system to a midly elaborate dance to allow it to
bootstrap while disobeying these lints (which would otherwise be
errors because Rust builds with `-D warnings`).

This patch includes one significant hack that causes a
regression. Because the `format_args!` macro emits calls to unstable
APIs it would trigger the lint.  I added a hack to the lint to make it
not trigger, but this in turn causes arguments to `println!` not to be
checked for feature gates. I don't presently understand macro
expansion well enough to fix. This is bug #20661.

Closes #16678

[rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
2015-01-07 15:34:56 -08:00
Brian Anderson
4a041170d1 mk: Remove RUST_NDEBUG and RUST_DEBUG defines. Unused 2015-01-07 13:33:22 -08:00
Alex Crichton
f3ad232022 rollup merge of #20584: brson/versioning
Also, change the version number to 1.0.0.
2015-01-05 18:42:08 -08:00
Alex Crichton
b8e404f289 rollup merge of #19998: th0114nd/unicode-bottom
In the HTML version of the documentation, it isn't rendered so might as well use the unicode representation.
2015-01-05 18:36:20 -08:00
Brian Anderson
c548b879ef Typo 2015-01-05 10:29:09 -08:00
Brian Anderson
edbb7c3ed1 0.13.0 -> 1.0.0 2015-01-05 10:26:10 -08:00
Brian Anderson
40bd1c245f Put version number in beta channel artifacts 2015-01-05 10:25:49 -08:00
bors
5e21e17d96 auto merge of #20437 : ranma42/rust/fix-make-install, r=alexcrichton
After 8b3c67690c the `make install`
command fails if docs are not disabled through CFG_DISABLE_DOCS,
because now the `install` target uses
../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh

Instead of explicitly depending on
dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz, the `prepare_[un]install`
targets now depend on `dist-tar-bins`, which packages the appropriate
dist archives depending on the configuration.
2015-01-04 14:21:08 +00:00
Alex Crichton
7d8d06f86b Remove deprecated functionality
This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.
2015-01-03 23:43:57 -08:00
Akos Kiss
6e5fb8bd1b Initial version of AArch64 support.
Adds AArch64 knowledge to:
* configure,
* make files,
* sources,
* tests, and
* documentation.
2015-01-03 15:16:10 +00:00
Andrea Canciani
f2ee9fca85 Fix make install dependencies
After 8b3c67690c the `make install`
command fails if docs are not disabled through CFG_DISABLE_DOCS,
because now the `install` target uses
../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh

In 714a2c678c the `prepare_install`
target wwas changed to conditionally depend also on the doc archive,
but did not modify `prepare_uninstall`.

Instead of explicitly depending on
dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz, the `prepare_[un]install`
targets now depend on `dist-tar-bins`, which packages the appropriate
dist archives depending on the configuration.
2015-01-03 09:49:51 +01:00
bors
fc2ba13939 auto merge of #20456 : brson/rust/packaging2, r=alexcrichton 2015-01-03 05:35:17 +00:00
Brian Anderson
d30353c1d2 Remove .pkg and .exe installers 2015-01-02 20:44:07 -08:00
Brian Anderson
e95cbb3aca mk: Change package name from 'rust' to 'rustc' 2015-01-02 13:36:51 -08:00
Alex Crichton
e80b9811a6 rollup merge of #20388: brson/install-tweaks
r? @alexcrichton
2015-01-02 09:22:40 -08:00
Alex Crichton
3cf1992c99 rollup merge of #20380: dcrewi/fix-make-install
There seems to be a problem introduced by
8b3c67690c that causes "make install"
to fail when the build is not configured to skip doc building.
2015-01-02 09:22:22 -08:00
Brian Anderson
d53914961c mk: Put the version number somewhere discoverable in the installer
The binaries for some release channels to not contain the version number,
which makes it hard for scripts to determine the version number.
2015-01-01 15:08:03 -08:00
Brian Anderson
b16111f8a9 mk: The doc directory is no longer included in the main package 2014-12-31 20:57:48 -08:00
David Creswick
714a2c678c fix "make install"
There seems to be a problem introduced by
8b3c67690c that causes "make install"
to fail when the build is not configured to skip doc building.
2014-12-31 17:33:47 -06:00
Alex Crichton
139f44bae8 rollup merge of #20375: brson/windistfix 2014-12-31 11:13:37 -08:00
Brian Anderson
7608dbad65 mk: Fix the location of a temp dir when building installer on win 2014-12-31 10:06:21 -08:00
Alex Crichton
04f42212a3 rollup merge of #20344: brson/srctarballs
Easier for scripts to figure out which artifact is the source code.
2014-12-30 16:26:21 -08:00
Alex Crichton
a239d71729 rollup merge of #20323: brson/beta
Adds a new 'beta cycle' variable that can be appended to the '-beta' version label, e.g. '-beta1'. Changes the version label for the beta channel temporarily to 'alpha'. Changes the artifact name of the beta channel to contain the version number instead of just being called 'beta'. The beta cycle number is currently set to 1.

The impact of this is that the first alphas will be called '1.0.0-alpha1' and the artifacts will also be called '1.0.0-alpha1-*.tar.gz'. We could alternately leave out the cycle number if we are confident there will be only one alpha cycle.

r? @alexcrichton cc @nikomatsakis @huonw
2014-12-30 16:26:09 -08:00
Brian Anderson
1131acbc8e mk: Append -src to source tarballs for easier identification 2014-12-30 11:47:12 -08:00
Brian Anderson
20fcece88b mk: The alpha will not have a cycle number 2014-12-30 10:18:54 -08:00
Michael Woerister
91a0e18866 debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
Brian Anderson
f253002e34 mk: The beta channel temporarily produced alpha versions 2014-12-29 20:19:02 -08:00
Brian Anderson
56c26ab663 mk: Allow an optional number to come after the beta version label 2014-12-29 20:17:47 -08:00
Alex Crichton
cb7599b83e rollup merge of #20317: brson/rust-installer-v2 2014-12-29 19:47:58 -08:00
Brian Anderson
b12dfbb491 Simplify some logic in dist.mk 2014-12-29 19:08:35 -08:00
Brian Anderson
7628806997 mk: Package mingw components in unix installer on windows
This puts stdc++ and the unwinding dll into the main package
and creates a separate rust-mingw package for everything else.
2014-12-29 17:26:05 -08:00
Brian Anderson
022d48566b mk: Make distcheck build binary tarballs on windows
These work, but aren't being built and uploaded because the bots run
'distcheck' not 'dist'.
2014-12-29 17:26:05 -08:00
Brian Anderson
8b3c67690c Install copyright information and package docs
This distributes docs in a separate package called rust-docs. The rust-packaging
project will combine it with Rust and Cargo into a single installer in a variety of formats.
2014-12-29 17:26:05 -08:00
Brian Anderson
4f2ab2bf46 Upgrade rust-installer to v2 2014-12-29 17:26:02 -08:00
Alex Crichton
6fabf421f0 rollup merge of #20245: fhahn/make-lexer-tests-runable-again
I would like to look into some issues related to the model lexer  #15883.

I stumbled upon 2 minor problems when I tried running the lexer tests:

* antlr did not put the generated files in the correct directory
* grammer/verify.rs did not work with the most recent version of rust

With these changes (and setting CLASSPATH=/usr/share/java/antlr-4.4-complete.jar:$CLASSPATH) I was able to execute the tests.

Note that I just fixed the syntax errors and added `None` as 2. argument of `Literal`. I am not sure if this is correct however. I still have to take a closer look at what verify.rs actually does. Are there any helpful pointers?
2014-12-29 16:36:18 -08:00
Alex Crichton
bcd3b1685a rollup merge of #20230: bheesham/noshard
I forgot to do this in my previous PR. This should close #19145 .
2014-12-29 16:36:11 -08:00
Florian Hahn
288195370c Fix output directory for generated antlr code 2014-12-29 19:40:40 +01:00
Alex Crichton
48048419b1 mk: Stop generating docs for deprecated crates
These crates are all deprecated for their rust-lang/$crate equivalents and by
generating docs we're generating broken links. The documentation for these
crates are generated out-of-tree and are managed separately, so we're not losing
the documentation altogether, just the links from the main distribution's docs.

Closes #20096
2014-12-28 09:34:38 -08:00
bors
bd3cf4c05f auto merge of #20218 : alexcrichton/rust/jemalloc-sections, r=luqmana
It's quite possible that small programs don't use all of jemalloc, and building
with -ffunction-sections and -fdata-sections allows the linker (via
--gc-sections) to strip out all unused code at link time. This decreases the
size of a "hello world" executable for me from 716K to 482K with no measurable
impact on link time. After this patch jemalloc is still the largest portion of
our hello world executables, but this helps cut down on the size at least
somewhat!
2014-12-26 06:31:47 +00:00
Bheesham Persaud
9092ebab20 Removed the sharding bit from mk/tests.mk
I forgot to do this in my previous PR. This should close #19145 .

	modified:   mk/tests.mk
2014-12-25 16:22:06 -05:00
bors
ead198c513 auto merge of #20024 : mneumann/rust/dragonfly-fixes3, r=alexcrichton 2014-12-25 05:11:36 +00:00
Alex Crichton
58d808f988 mk: Build jemalloc with -ffunction-sections
It's quite possible that small programs don't use all of jemalloc, and building
with -ffunction-sections and -fdata-sections allows the linker (via
--gc-sections) to strip out all unused code at link time. This decreases the
size of a "hello world" executable for me from 716K to 482K with no measurable
impact on link time. After this patch jemalloc is still the largest portion of
our hello world executables, but this helps cut down on the size at least
somewhat!
2014-12-24 20:20:01 -08:00
Maya Nitu
98ed882511 Removed unused context-switching assembly code. 2014-12-22 19:12:35 +02:00
Alex Crichton
fb7c08876e Test fixes and rebase conflicts 2014-12-21 13:49:04 -08:00
Alex Crichton
7e62684bb4 rollup merge of #20054: bheesham/nomet
#19145
2014-12-21 09:27:35 -08:00
Alex Crichton
576467b492 rollup merge of #19983: Munksgaard/fix-19981
The use of `+a+x` is deprecated.

Fixes #19981.
2014-12-21 09:26:44 -08:00
Alex Crichton
8c030a87b3 rollup merge of #19966: steveklabnik/remove_l10n
@brson suggested that I remove this stuff in https://github.com/rust-lang/rust/pull/19897/files#r22014810, but it seems more appropriate to do separate from that.
2014-12-21 09:26:43 -08:00
Eduard Burtescu
c54fc980f3 Split resolve from rustc::middle into rustc_resolve. 2014-12-20 07:28:47 +02:00
th0114nd
4ee73a124c Changed LaTex $\bot$s to ⊥
In the HTML version of the documentation, it isn't rendered so might as well use the unicode representation.
Part of the problem was that putting a math unicode character wasn't
rendering properly in the pdf, so extra steps were needed to define
the unicode charecter ⊥ in reference.tex

closes #15285
2014-12-19 18:09:33 -05:00
Bheesham Persaud
611ef49f2f Took out all of the metrics stuff from tests.mk
References rust-lang/rust/#19145

	modified:   src/llvm (new commits)
2014-12-19 08:57:15 -05:00
Michael Neumann
25c1bfe175 Several fixes for DragonFly (rebase) 2014-12-19 13:05:06 +01:00
Aaron Turon
2b3477d373 libs: merge librustrt into libstd
This commit merges the `rustrt` crate into `std`, undoing part of the
facade. This merger continues the paring down of the runtime system.

Code relying on the public API of `rustrt` will break; some of this API
is now available through `std::rt`, but is likely to change and/or be
removed very soon.

[breaking-change]
2014-12-18 23:31:34 -08:00
Philip Munksgaard
3d6babee9d Use -perm /a+x instead of -perm +a+x in calls to find
The use of `+a+x` is deprecated.

Fixes #19981.
2014-12-18 16:22:10 +01:00
Steve Klabnik
11a94f2ac7 remove l10n 2014-12-17 21:00:04 -05:00
Ken Tossell
cbf80f3a68 Only try to install the doc directory if it exists.
If you configure with `--disable-docs`, the `doc` directory does not get generated, so
`cp -r doc dist/` fails when you `make dist{,-tar-bins,-doc}` or `make install`
2014-12-17 19:24:40 -05:00
Alex Crichton
b56d4bf916 rollup merge of #19923: pnkfelix/fix-make-tags.emacs
Fix `make TAGS.emacs`.

@nikomatsakis has been complaining to me about this.  (I had not noticed since I drive `ctags` with a separate script.)

(Suitable for a rollup build.)
2014-12-17 11:50:30 -08:00
Alex Crichton
58020d38b1 rollup merge of #19753: brson/rust-installer
This is just a refactoring of the current installer so that Rust and Cargo
use the same codebase.

cc #16456
2014-12-17 11:50:23 -08:00
Felix S. Klock II
8f4e9c2357 Fix make TAGS.emacs. 2014-12-16 17:08:49 +01:00
Brian Anderson
1f349f6c71 rollup merge of #19754: steveklabnik/remove_sundown 2014-12-15 06:45:33 -08:00
bors
b677746b1e auto merge of #19750 : murarth/rust/rusti-support, r=brson
Makes a couple changes that support the implementation of a REPL:

* Implementation of wrapper code for LLVM ExecutionEngine API
* Fixing a change I made earlier to reset compiler state in `phase_1_[...]`
  instead of `compile_input` as the latter is not used in a REPL
2014-12-15 08:32:45 +00:00
Niko Matsakis
2854d1bfc2 Separate borrowck into its own crate and remove dead code as well. 2014-12-13 06:01:19 -05:00
Brian Anderson
e92e8ac365 Use rust-installer for installation
This is just a refactoring of the current installer so that Rust and Cargo
use the same codebase.

cc #16456
2014-12-11 17:14:17 -08:00
Murarth
2c028452b5 Add LLVM ExecutionEngine API 2014-12-11 15:33:27 -07:00
Steve Klabnik
3cb10ef147 Remove mentions of sundown. 2014-12-11 16:36:11 -05:00
Brian Anderson
65bca024a7 Don't try to dist src/README.md which does not exist 2014-12-10 09:47:36 -08:00
Alex Crichton
c56344ba31 rollup merge of #19604: vadimcn/gcc-less
- Support gcc-less installation on Windows.  To do so in unattended mode run:`<intaller>.exe /TYPE=compact /SILENT`.
- Do not require admin privileges to install.

cc #19519
2014-12-09 09:24:52 -08:00
Vadim Chugunov
de8f48b10a - Support gcc-less installation on Windows. To do so in unattended mode run:<intaller>.exe /TYPE=compact /SILENT.
- Do not require admin privileges to install.
2014-12-06 12:48:32 -08:00
Niko Matsakis
602fc781ff Remove crates from test list so that we don't waste time building them. 2014-12-05 02:01:57 -05:00
Niko Matsakis
61edb0ccb7 Separate the driver into its own crate that uses trans, typeck. 2014-12-04 10:04:52 -05:00
Niko Matsakis
93eb4333a0 Move typeck into its own crate. 2014-12-04 10:04:52 -05:00
bors
3c89031e1f auto merge of #18613 : steveklabnik/rust/ownership_guide, r=huonw
This is a work in progress, but this should get *extensive* review, so I'm putting it up early and often.

This is the start of a draft of the new 'ownership guide,' which explains ownership, borrowing, etc. I'm feeling better about this framing than last time's, but we'll see.
2014-12-04 04:52:37 +00:00
bors
09f04bf2c9 auto merge of #19417 : alexcrichton/rust/issue-19383, r=huonw
We only build LLVM for the host architecture, not the target architecture, so
this was just a minor typo in the parameters uses.

Closes #19383
2014-12-01 07:11:53 +00:00
Corey Farwell
38e008eccd Fix typo in tests makefile 2014-11-30 09:07:36 -05:00
Alex Crichton
1d4ce37946 mk: Use host llvm linkage paths, not target ones
We only build LLVM for the host architecture, not the target architecture, so
this was just a minor typo in the parameters uses.

Closes #19383
2014-11-30 00:01:19 -08:00
Alex Crichton
4c5b9669e8 rollup merge of #19322: DiamondLovesYou/multi-llvmdeps 2014-11-26 16:50:12 -08:00
Alex Crichton
60299d75e2 rollup merge of #19282: steveklabnik/remove_grammar
I stumbled across this today, and it's not really working. It's been around for a very, very long time, and seems to be based on stuff we don't even have anymore.

I asked in `#rust-internals`, and @cmr said we should just kill it, so here I am. :) I don't think that anything else uses Java, but maybe I missed something.

And if this _isn't_ what we want, I'm fine with closing too. Just some housekeeping.
2014-11-26 16:49:36 -08:00
Steve Klabnik
e2fe7a083e Lifetime guide -> ownership guide 2014-11-26 15:03:12 -05:00
Michael Woerister
7608d06027 debuginfo: Add script that allows to conveniently start LLDB in "rust-mode" 2014-11-26 15:58:17 +01:00
Richard Diamond
ce507c6c22 Don't forget the tests. 2014-11-25 19:05:28 -06:00
Richard Diamond
80d520fcf2 Don't use the same llvmdeps.rs for every host. 2014-11-25 17:28:49 -06:00
Steve Klabnik
ba9e02f862 remove the generation of grammar from the reference 2014-11-24 17:23:55 -05:00
Aaron Turon
985acfdb67 Merge libsync into libstd
This patch merges the `libsync` crate into `libstd`, undoing part of the
facade. This is in preparation for ultimately merging `librustrt`, as
well as the upcoming rewrite of `sync`.

Because this removes the `libsync` crate, it is a:

[breaking-change]

However, all uses of `libsync` should be able to reroute through
`std::sync` and `std::comm` instead.
2014-11-24 10:51:39 -08:00
Jakub Bukaj
f90471e4e3 rollup merge of #19161: jmesmon/mk-fixes
This is a collection of misc issues I've run into while adding bindir & libdir support that aren't really bindir & libdir specific.

While I continue to fiddle with bindir and libdir bugs, I figured these might be useful for others to have merged.
2014-11-23 14:11:47 -05:00
bors
2af82f7530 auto merge of #19117 : jmesmon/rust/mk-cfg-suffix, r=cmr
Right now we'll end up globbing them into the accepted targets and (ever worse) they will override the make variables of real target files because we `include`d everything in that directory.

As a side effect, editors get a better hint on file types.
2014-11-22 01:46:46 +00:00
bors
2fcbf90d68 auto merge of #16552 : jauhien/rust/fix-libdir, r=alexcrichton
Fixies #11671

This commit changes default relative libdir 'lib' to a relative libdir calculated using LIBDIR provided by --libdir configuration option. In case if no option was provided behavior does not change.
2014-11-21 06:21:48 +00:00
Aaron Turon
40c78ab037 Fallout from libgreen and libnative removal 2014-11-20 17:19:24 -08:00
Aaron Turon
3ee916e50b Remove libnative
With runtime removal complete, there's nothing left of libnative. This
commit removes it.

Fixes #18687

[breaking-change]
2014-11-20 17:19:13 -08:00
Cody P Schafer
12749fc8ec mk/rt: use CFG_LLVM_TARGET instead of plain target when calling llc
We add CFG_LLVM_TARGET_$(target) (which can be defined in any of the
mk/cfg/* files) and supply a default to the plain target name

CFG_LLVM_TARGET mirrors the value of llvm_target (aka llvm-target) in
the librustc_back runtime target specification.
2014-11-20 18:34:10 -05:00
Cody P Schafer
29cc7c2adf mk/target: fix typo so we depend on the correct directory
Without this, if we we're using a non-standard host libdir, the target
bindir would not exist (and rustc would fail to write to the
non-existent directory).
2014-11-20 16:00:12 -05:00
Cody P Schafer
aa58d534e5 mk/stage0: complain instead of creating an empty file
If the expected rustc snapshot is not where we expect it to be,
complain and fail at that point rather than creating a empty rustc file
and continuing until we try to run it.
2014-11-20 16:00:12 -05:00
Jakub Bukaj
f71b852d38 rollup merge of #19103: huonw/literal-suffixes
Futureproof Rust for fancier suffixed literals. The Rust compiler tokenises a literal followed immediately (no whitespace) by an identifier as a single token: (for example) the text sequences `"foo"bar`, `1baz` and `1u1024` are now a single token rather than the pairs `"foo"` `bar`, `1` `baz` and `1u` `1024` respectively.

The compiler rejects all such suffixes in the parser, except for the 12 numeric suffixes we have now.

I'm fairly sure this will affect very few programs, since it's not currently legal to have `<literal><identifier>` in a Rust program, except in a macro invocation. Any macro invocation relying on this behaviour can simply separate the two tokens with whitespace: `foo!("bar"baz)` becomes `foo!("bar" baz)`.

This implements [RFC 463](https://github.com/rust-lang/rfcs/blob/master/text/0463-future-proof-literal-suffixes.md), and so closes https://github.com/rust-lang/rust/issues/19088.
2014-11-19 22:41:05 +01:00
Jakub Bukaj
cbdaf2ebc7 rollup merge of #18903: steveklabnik/error_handling_guide
Now that we've done `fail` -> `panic`, I feel bringing back the error handling guide is a good idea. We had one long ago, but it was removed when conditions were removed.

This doesn't cover the new FromError stuff, but I feel like it's already useful in this state, so I'm sending this PR now.
2014-11-19 22:37:07 +01:00
Cody P Schafer
8581f00249 mk/cfg: add .mk suffix on files to avoid "supprises" when backup files (file~) are in the directory 2014-11-19 16:00:51 -05:00
Huon Wilson
ff0278bc15 Update makefiles to ensure src/grammar/verify.rs is built.
It's not run, but this ensures that the code at least doesn't go out of
date.
2014-11-19 13:12:05 +11:00
Steve Klabnik
0e6d97aab2 New guide: error handling 2014-11-18 12:56:55 -05:00
Niko Matsakis
dc6e414e6f Move trans, back, driver, and back into a new crate, rustc_trans. Reduces memory usage significantly and opens opportunities for more parallel compilation. 2014-11-18 07:32:43 -05:00
Cody P Schafer
600cec1cd8 mk/rt/jemalloc: pass CFG_GCCISH_CFLAGS inside CC instead of passing CFG_CFLAGS in EXTRA_CFLAGS
- CFG_CFLAGS is gone (it was previously only used by jemalloc anyhow).
 - CFG_JEMALLOC_CFLAGS may contain flags needed for the compiler to
   function (produce a binary output).
 - jemalloc's configure runs $(CC) without EXTRA_CFLAGS, and (without
   this change) will fail if any flags are required for CC to work.
2014-11-17 16:41:15 -05:00
Cody P Schafer
61e53c94f2 CFG_CFLAGS is only used for jemalloc, rename all uses to CFG_JEMALLOC_CFLAGS
i386-apple-ios already used CFG_JEMALLOC_CFLAGS, so merge that one
2014-11-17 16:41:09 -05:00
Jauhien Piatlicki
e889f8091a Look for standard crates in LIBDIR provided by --libdir option,
not in hardcoded libdir path. If there was no LIBDIR provided
during configuration fallback to hardcoded paths.

Thanks to Jan Niklas Hasse for solution and to Alex Crichton for improvements.

Closes #11671
2014-11-16 01:01:11 +01:00
Brian Anderson
7c36336c6f mk: Fix configuration of version commit information
Commit bec2ee77f7 started quoting paths
discovered as part of the `probe` function, which includes git.  The
`make` `wildcard` function appears to be incompatible with quoted
paths so this check in the makefile now fails. Employing `wildcard`
here appears to only re-verify that git actually exists, which the
configure script already did, so I've just removed it.

Additionally, with the quoted paths the `subst` function should no
longer be needed, so I've removed it as well.

Closes #18771
2014-11-10 14:57:21 -08:00
Vitali Haravy
c254957078 Attempt to fix the problem with failing distcheck. 2014-11-10 21:05:34 +00:00
klutzy
1df6be1926 mk: Fix Windows cross-build prefix 2014-11-09 04:26:18 +09:00
bors
c437fcf3e5 auto merge of #18724 : gamazeps/rust/toc, r=alexcrichton
Using @adrientetar advices

Closes #17505
2014-11-08 02:26:37 +00:00
bors
0a3cbf8cf4 auto merge of #18673 : VHaravy/rust/issue-18632, r=alexcrichton
1. Introduce `putpathvar` function that prints variable shell-quoted by using `%q` format specifier. This function is used within `probe` to save the result into `config.tmp`.
2. Removes search-and-replace pattern that transforms `\` into `/` as it messes up shell-quoted strings.
2014-11-07 18:46:25 +00:00
Alex Crichton
d27039d701 rollup merge of #18709 : alexcrichton/fix-windows 2014-11-06 15:55:46 -08:00
gamazeps
9e5b283e17 Guide: Puts the toc again in the doc
Closes #17505
2014-11-07 00:06:58 +01:00
Alex Crichton
03006c7300 rollup merge of #18625 : alexcrichton/no-more-rlibc 2014-11-06 13:53:27 -08:00
Alex Crichton
b39f1dcba0 Remove rlibc from the distribution
To make progress on #18585 we're paring down the distribution to theoretically
"only libstd", and this commit makes progress on this by removing the rlibc
crate from the distribution.

The crate has now been moved into an external cargo package located in the rust
lang organization [1]. This is a breaking change due to this removal, and
existing crates depending on `rlibc` should use the Cargo crate instead.

[1]: https://github.com/rust-lang/rlibc

[breaking-change]
cc #18585
2014-11-06 13:37:55 -08:00
Alex Crichton
bb5f03b900 mk: Add -C prefer-dynamic to stage3 libs
Right now the windows nightlies are failing because they're encountering a
linker error when producing stage3 libs. The stage3 libs aren't actually used in
general, and we primarily just want to generate a static stage3 binary, not
static stage3 dylibs.
2014-11-06 11:29:49 -08:00
Vitali Haravy
461945ee9e Correct building documenation with Pandoc and TeX on Windows. 2014-11-06 18:08:33 +03:00
Michael Woerister
2f215f644f debuginfo: Make LLDB test make targets dependent on lldb python scripts. 2014-11-05 13:32:09 +01:00
bors
eca8f11315 auto merge of #18592 : alexcrichton/rust/dylib-harder, r=pcwalton
If a dylib is being produced, the compiler will now first check to see if it can
be created entirely statically before falling back to dynamic dependencies. This
behavior can be overridden with `-C prefer-dynamic`.

Due to the alteration in behavior, this is a breaking change. Any previous users
relying on dylibs implicitly maximizing dynamic dependencies should start
passing `-C prefer-dynamic` to compilations.

Closes #18499
[breaking-change]
2014-11-05 07:01:38 +00:00
Corey Richardson
6b130e3dd9 Implement flexible target specification
Removes all target-specific knowledge from rustc. Some targets have changed
during this, but none of these should be very visible outside of
cross-compilation. The changes make our targets more consistent.

iX86-unknown-linux-gnu is now only available as i686-unknown-linux-gnu. We
used to accept any value of X greater than 1. i686 was released in 1995, and
should encompass the bare minimum of what Rust supports on x86 CPUs.

The only two windows targets are now i686-pc-windows-gnu and
x86_64-pc-windows-gnu.

The iOS target has been renamed from arm-apple-ios to arm-apple-darwin.

A complete list of the targets we accept now:

arm-apple-darwin
arm-linux-androideabi
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf

i686-apple-darwin
i686-pc-windows-gnu
i686-unknown-freebsd
i686-unknown-linux-gnu

mips-unknown-linux-gnu
mipsel-unknown-linux-gnu

x86_64-apple-darwin
x86_64-unknown-freebsd
x86_64-unknown-linux-gnu
x86_64-pc-windows-gnu

Closes #16093

[breaking-change]
2014-11-04 05:07:47 -05:00
Alex Crichton
3036b00127 rustc: Default to static linking dylibs
If a dylib is being produced, the compiler will now first check to see if it can
be created entirely statically before falling back to dynamic dependencies. This
behavior can be overridden with `-C prefer-dynamic`.

Due to the alteration in behavior, this is a breaking change. Any previous users
relying on dylibs implicitly maximizing dynamic dependencies should start
passing `-C prefer-dynamic` to compilations.

Closes #18499
[breaking-change]
2014-11-03 15:08:20 -08:00
Steven Fackler
711a955e0c Work around jemalloc/jemalloc#161 2014-11-02 15:52:16 -08:00
Brian Anderson
b8e7c4fcb9 mk: Clean just one llvm build at a time. Closes #17852
When building for multiple targets, the initial 'make' invocation
always fails. The missing build stamp causes clean-llvm to be
invoked, but clean-llvm cleans *all* llvm builds. So what happens
is that 1) all llvm's are cleaned (a no-op), 2) llvm-${target1}
builds, 3) all llvm's are cleaned (deleting llvm-${target1}),
4) llvm-${target2} is built, 5) the remaining build for ${target1}
fails because llvm does not exist.

This makes the clean operation only clean the correct llvm build.
Should greatly reduce bot failures.
2014-10-29 19:54:52 -07:00
Daniel Micay
79723a3e30 Revert "enable parallel codegen by default"
This reverts commit c245c5bbad.

Parallel code generation generates invalid code for librand, which is
caught by recent versions of binutils.
2014-10-28 20:14:00 -04:00
bors
3f37e2efac auto merge of #18192 : jmesmon/rust/platform-generic, r=alexcrichton
The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
2014-10-28 05:46:53 +00:00
Cody P Schafer
f3fd79d6aa split platform definitions out of mk/platform.mk
The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
2014-10-25 21:01:18 -04:00
Steve Klabnik
0c3ad8be5b build the crates guide 2014-10-23 07:40:29 -04:00
Nick Cameron
80ff1d1a10 Error if we should be able to Valgrind but can't 2014-10-23 14:28:52 +13:00
Nick Cameron
1285d4f467 Remove support for .rc files from test.mk 2014-10-23 13:52:35 +13:00
Nick Cameron
c562b5bd9d Make rpass-valgrind work with pretty 2014-10-23 13:52:34 +13:00
Nick Cameron
f466e1a59f Add run-pass-valgrind tests
Closes #16914
2014-10-23 13:52:34 +13:00
Michael Woerister
93bd605c58 debuginfo: Enable LLDB test suite on Darwin. 2014-10-22 10:47:45 +02:00
Stuart Pernsteiner
c245c5bbad enable parallel codegen by default
Enable parallel codegen (2 units) by default when --opt-level is 0 or 1.  This
gives a minor speedup on large crates (~10%), with only a tiny slowdown (~2%)
for small ones (which usually build in under a second regardless).  The current
default (no parallelization) is used when the user requests optimization
(--opt-level 2 or 3), and when the user has enabled LTO (which is incompatible
with parallel codegen).

This commit also changes the rust build system to use parallel codegen
when appropriate.  This means codegen-units=4 for stage0 always, and
also for stage1 and stage2 when configured with --disable-optimize.
(Other settings use codegen-units=1 for stage1 and stage2, to get
maximum performance for release binaries.)  The build system also sets
codegen-units=1 for compiletest tests (compiletest does its own
parallelization) and uses the same setting as stage2 for crate tests.
2014-10-21 14:46:16 -07:00
Cody P Schafer
d75ff2ff93 mk/rt: "export CC" does not seem to work (gcc observed), use explicit shell variables instead 2014-10-20 15:35:38 -04:00
Alex Crichton
fb169d5543 Remove a number of deprecated crates
All of these crates have been deprecated for some time and properly live in the
rust-lang organization as cargo-based crates.

To update your code, depend on the rust-lang/foo repository via cargo.

[breaking-change]
2014-10-19 12:59:40 -07:00
bors
9b80efd74e auto merge of #17009 : kballard/rust/install_no_sudo, r=pnkfelix
When running `sudo make install`, we only want to run the actual install
as root, the building of the documentation and the distribution folder
should happen as the non-root user.

Related to #13728.
2014-10-17 22:57:30 +00:00
Luqman Aden
26e547af5d libsyntax: Remove all uses of {:?}. 2014-10-16 11:15:34 -04:00
Alex Crichton
724bbab577 rollup merge of #18012 : pnkfelix/gate-bors-on-building-compiletest 2014-10-13 15:10:25 -07:00
Felix S. Klock II
b26972e28b Make bors check that compiletest builds from both stage0 and stage1 rustc.
----

To reproduce issue on commit ba246100ca
it does not suffice to add just `check-build-compiletest` to
`check-secondary`; one must also ensure that `check-build-compiletest`
precedes the satisification of the `check` rule.

Otherwise hidden dependencies of `compiletest` would end up getting
satisfied when make builds `rustc` at each stage in order to
eventually run `check-stage2`.

So to handle that I moved `check-secondary` before `check` in the
`check-all` rule that bors uses, and for good measure, I also put
`check-build-compiltest` at the front of the `check-secondary` rule's
dependencies.

My understanding is that running `check-secondary` should be
relatively cheap, and thus such a reordering will not hurt bors.

----

Fix #17883.
2014-10-13 20:58:34 +02:00
Alex Crichton
5b043d712b Fix find check for executables
Apparently the fix in d08441b9 didn't catch a recent executable (#17965), but
I've verified that this does indeed catch the executable
2014-10-12 12:36:32 -07:00
bors
4d031d7f86 auto merge of #17940 : pnkfelix/rust/fix-check-stage1-on-clean-dir, r=huonw
compiletest needs to link to native crate, or at least the `rt` library.

(I tried using a dependency on `rustrt` instead, and that did not resolve the problem.  But this does.)

Partially addresses #17883
2014-10-11 15:17:09 +00:00
Felix S. Klock II
b63a18f585 compiletest needs to link to native crate, or at least the rt library.
(I tried using a dependency on `rustrt` instead, and that did not
resolve the problem.  But this does.)

Fix #17883
2014-10-11 11:08:15 +02:00
bors
ba246100ca auto merge of #17928 : steveklabnik/rust/remove_runtime_guide, r=alexcrichton
Now that libgreen is gone, this is all wrong.

Fixes #17923
2014-10-11 07:12:02 +00:00
Steve Klabnik
51c5a8eb1b Remove the runtime guide.
Now that libgreen is gone, this is all wrong.

Fixes #17923
2014-10-10 13:30:17 -04:00
Brian Anderson
afc1b20d8e Bump version to 0.13.0 2014-10-09 10:41:23 -07:00
Brian Anderson
158eaa643b 0.12.0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUNrj+AAoJEIWrlub6G+X+4TMQAIlyIoTpbZfA7MgaqHmrqp/O
 DkWH4sjoiTL3pdqHitbaJWFzStLjmM+hzOKYVYxXJGqpHuZv7pbnN2sQCKvJ6m9E
 htojoy9ZVeOUjkqz3+PYc6mh+SuQq4bpAhnnt60tLSxZCda7uTpdTcsOgDlwhu8P
 /YIbnBHo6brcQi6kEK27uN7U2MsluRR/ZhAmZH1mvrTtjKrGsKTEdta2NW1tUzNT
 sDluM9D0/WFjwSA9OohjtpUI7KYudqChOCRaqREgNq6xc/9at/TQHULsjzxLFIiC
 tAttF7ZZ2s1TmS4qzmx3AAWl8n8xYrDo+CpfPqKvSGwDegfHN9Epa+24Cdf2Q5GO
 9RSup89NlNNo3tjmK+G1cUqi/K9RseiZNPSJSoLlR2L9QFg/VFEVbcaZX+oX+CQF
 pfWkKqsfLqj50EimO+vuXRZhShHlu/McOdN0cd+S0KEGdd7ngqU3d7YJf9Ppm1mV
 d1VUqnPxvDrGQTGqk4cpGMIv+LmT6vY2iix3ha583zMYcU9VWrC9VEmR3I4XZefE
 UgsbAx2jIgagWa6ylDpes7X8dn/7qj3BA6l3Bt9aGrs9KnyQ+a3xOyz8dFvRJwks
 T8izOhfJXpxW4CLFZjDIQ9RD/joJuvuqTSIqf7zGIxIbMUQFB9EC/Rn7a3ftidds
 aZVZSl2li1vOa3DucW64
 =4lHl
 -----END PGP SIGNATURE-----

Merge tag '0.12.0'

0.12.0 release
2014-10-09 09:36:30 -07:00
Michael Woerister
895aac9935 debuginfo: Add LLDB version handling to test infrastructure. 2014-10-08 08:24:49 +02:00
Brian Anderson
ea4d5d2a24 Rename RELEASES.txt to RELEASES.md. It's markdown. 2014-10-07 11:18:47 -07:00
bors
dfbe9eb3b2 auto merge of #17777 : lambda/rust/fix-docs-short-hash, r=alexcrichton
The escaped newline in the middle of the variable reference breaks the
short hash substitution, leaving the link text exmpty; rewrap so that
each replacement is on its own line.
2014-10-05 09:07:06 +00:00
Brian Campbell
df4051e0b1 docs: Fix short hash link to github
The escaped newline in the middle of the variable reference breaks the
short hash substitution, leaving the link text exmpty; rewrap so that
each replacement is on its own line.
2014-10-04 14:41:37 -04:00
Luqman Aden
4b22178d32 Update LLVM. 2014-10-04 13:28:57 -04:00
bors
9a2286d3a1 auto merge of #16995 : kmcallister/rust/plugin-tutorial, r=alexcrichton
@steveklabnik, are you interested in looking this over?
2014-10-03 07:33:26 +00:00
Alex Crichton
6adeb6a4a3 rollup merge of #17708 : bnoordhuis/fix-ctags-makefile-target 2014-10-02 14:50:37 -07:00
Alex Crichton
182044b425 rollup merge of #17706 : thestinger/supp 2014-10-02 14:50:35 -07:00
Daniel Micay
618e41874a remove the uv_support code 2014-10-02 05:05:12 -04:00
bors
dd7f00de80 auto merge of #17681 : jgallagher/rust/dep-info-escape-spaces, r=alexcrichton
cc #17627
2014-10-02 08:12:19 +00:00
Ben Noordhuis
9115a7353c Fix make TAGS.vi target
Remove superfluous parentheses from the CTAGS_LOCATIONS expression.
Fixes the following error when executing `make TAGS.vi`:

    /bin/sh: -c: line 0: syntax error near unexpected token `)'
2014-10-02 03:34:14 +02:00
Keegan McAllister
61bf75bb5e Add a guide to compiler plugins
Fixes #16983.
2014-10-01 13:21:52 -07:00
Aaron Turon
c5d2ed54a3 Remove libuv, gyp
This commit removes the libuv and gyp submodules, as well as all build
infrastructure related to them.

For more context, see the [runtime removal
RFC](https://github.com/rust-lang/rfcs/pull/230)

[breaking-change]
2014-10-01 12:42:30 -07:00
Aaron Turon
002643dcf0 Remove librustuv
This commit removes the `librustuv` crate.

See the [runtime removal
RFC](https://github.com/rust-lang/rfcs/pull/230) for more context.

See [green-rs](https://github.com/alexcrichton/green-rs/) for a possible
migration path if you wish to continue using green-threaded I/O. The
library provides its own I/O API surface.

[breaking-change]
2014-10-01 10:34:39 -07:00
John Gallagher
8dab56ea9d Make find->tidy resilient to filenames with spaces 2014-10-01 07:49:06 -04:00
bors
38015eeb70 auto merge of #17640 : brson/rust/wininst, r=alexcrichton
This makes the windows `make dist` target start producing binary tarballs, and tweaks install.sh so they work, in preparation for working on a combined Rust+Cargo installer.
2014-09-30 12:27:27 +00:00
Brian Anderson
0f75b2911c mk: Start producing binary tarballs on windows
We may use these for creating combined rust/cargo installers
2014-09-29 15:29:10 -07:00
Alex Crichton
7784a8d397 rollup merge of #17592 : kmcallister/inline-asm-loc 2014-09-29 08:14:23 -07:00
Alex Crichton
01c25e6c7b rollup merge of #17542 : brson/devchannel 2014-09-29 08:12:09 -07:00
bors
5079a10b1e auto merge of #17538 : brson/rust/winmk, r=alexcrichton 2014-09-29 12:43:13 +00:00
Keegan McAllister
8826fdfe37 Keep ExpnId abstract by providing conversions 2014-09-28 09:25:48 -07:00
Brian Anderson
b5c17b3352 Use 'dev' for the release channel and version suffix when building from source
This is more consistent with how the other channels work.
2014-09-25 15:28:00 -07:00
Niko Matsakis
3694f42b8c Move checking of whether fields are Sized or not into wf / trait code. 2014-09-25 07:09:13 -04:00
Brian Anderson
f46b57252e mk: Fix a minor makefile warning on windows 2014-09-24 17:46:36 -07:00
bors
d853666c7b auto merge of #17463 : oskchaitanya/rust/master, r=alexcrichton
Setting LC_ALL to C helps keep gdb's output consistent ('print' gives us expected output). This fixes #17423. I do not have access to a windows/mac machines to test this. I've only tested it on an x86_64 linux box.
2014-09-24 09:40:52 +00:00
bors
9cce2b7bab auto merge of #17449 : mcoffin/rust/master, r=alexcrichton
Right now, libuv will **always** be built for the host system (at least when building on OSX) because the information about the cross compiler is never actually passed to GYP. I don't know how anybody has been managing to build cross compilers with this.

Note that, at least on OSX, there is a bug in GYP that will send clang flags to non-clang compilers and it will still attempt to use Xcode's libtool, so this doesn't completely fix the problem of cross-compiling on an OSX host, but it's a start.
2014-09-24 05:10:45 +00:00
O S K Chaitanya
2443dd0dcc collapse setting and exporting RUST_BENCH into one line 2014-09-23 03:12:37 +02:00
O S K Chaitanya
23ba9072e1 Use locale 'C' for running tests. Closes #17423 2014-09-23 03:07:39 +02:00
Steve Klabnik
47682f96de manual -> reference & formatting
'reference' sounds better than 'manual' to me here, and rust.html is
certainly wrong.

I also wrapped everything to 80 cols.
2014-09-22 17:54:09 -04:00
Matt Coffin
bcc4ee0dbc Copy GYP environment variables on iOS 2014-09-22 12:40:08 -06:00
Matt Coffin
650683f926 Ensure that compiler environment is passed to gyp
this only affects libuv
2014-09-22 12:34:00 -06:00
Brian Anderson
d53f80dcd6 mk: Remove check-fast target 2014-09-18 11:49:03 -07:00
Alex Crichton
04c537ff56 rollup merge of #17285 : brson/relchan 2014-09-17 08:49:21 -07:00
Brian Anderson
a3c27ea3c6 mk: Update how the build deals with version labels. #16677
Adds a new configure flag, --release-channel, which determines how the version
number should be augmented with a release label, as well as how the distribution
artifacts will be named. This is entirely for use by the build automation.

--release-channel can be either 'source', 'nightly', 'beta', or 'stable'.

Here's a summary of the affect of these values on version number and
artifact naming, respectively:

* source - '0.12.0-pre', 'rust-0.12.0-pre-...'
* nightly - '0.12.0-nightly', 'rust-nightly-...'
* beta - '0.12.0-beta', 'rust-beta-...'
* stable - '0.12.0', 'rust-0.12.0-...'

Per http://discuss.rust-lang.org/t/rfc-impending-changes-to-the-release-process/508/1
2014-09-15 16:25:20 -07:00
Niko Matsakis
713cf373c1 Take core as a dependency on librlibc. This is needed so that it can
see the lang-items for Sized etc. @acrichto and @thestinger had no
objections.
2014-09-15 14:58:49 -04:00
bors
e73156fe32 auto merge of #17200 : brson/rust/wintrip-w64, r=cmr
This updates our build system to prefer `i686-w64-mingw32` as the 32-bit windows triple instead of `i686-pc-mingw32`. This is an interim step to make the build artifacts consistent until https://github.com/rust-lang/rust/issues/15717 is done.
2014-09-15 12:56:13 +00:00
bors
3e7e2af472 auto merge of #17256 : alexcrichton/rust/issue-17183, r=sfackler
This file is touched during the build process and will trigger more rebuilds
than necessary.

Closes #17183
2014-09-15 07:06:09 +00:00
Alex Crichton
134c1e954e mk: Don't depend on src/jemalloc/VERSION
This file is touched during the build process and will trigger more rebuilds
than necessary.

Closes #17183
2014-09-14 14:42:45 -07:00
Eduard Burtescu
d6fb338d01 syntax: ast_map: use borrowed references into the AST. 2014-09-14 03:39:36 +03:00
bors
7277fe9ee7 auto merge of #17161 : vadimcn/rust/fix-debuginfo, r=alexcrichton
This PR fixes debuginfo tests on Windows.
2014-09-13 17:25:54 +00:00
Brian Anderson
1324a37795 Remove build system support for i686-pc-mingw32 triple in favor if i686-w64-mingw32 2014-09-12 10:46:31 -07:00
bors
4727381685 auto merge of #16657 : steveklabnik/rust/goodbye_tutorial, r=brson
The Guide isn't 100% perfect, but it's basically complete. It's
certainly better than the tutorial is. Time to start pointing more
people its way.

I also just made it consistent to call all things 'guides' rather than
tutorials.

Fixes #9874. This is the big one.

And two bugs that just go away.

Fixes #14503.
Fixes #15009.
2014-09-12 01:15:41 +00:00
Brian Anderson
0af2bb5fbe mk: Fix defs for i686-w64-mingw32 2014-09-11 18:01:07 -07:00
bors
06c0b1d28a auto merge of #16957 : vadimcn/rust/package-gcc, r=brson
Package rustc's mingw dependencies into Windows installer to avoid requiring a separate mingw install.

Closes #11782
2014-09-11 21:55:42 +00:00
Steve Klabnik
c456cca90a only deprecate the guide rather than 🔥 🔥 🔥 2014-09-11 16:21:32 -04:00
Steve Klabnik
a99ba25f2b Replace the Tutorial with the Guide.
The Guide isn't 100% perfect, but it's basically complete. It's
certainly better than the tutorial is. Time to start pointing more
people its way.

I also just made it consistent to call all things 'guides' rather than
tutorials.

Fixes #9874. This is the big one.

And two bugs that just go away.

Fixes #14503.
Fixes #15009.
2014-09-11 16:21:32 -04:00
Vadim Chugunov
7085b3edd9 Package rustc's mingw dependencies into Windows installer.
gcc, ld, ar, dlltool, windres go into $(RUST)/bin/rustlib/<triple>/bin/
platform libraries and startup objects got into $(RUST)/bin/rustlib/<triple>/lib/
2014-09-11 09:40:21 -07:00
bors
29f817fa22 auto merge of #17139 : brson/rust/lualatex, r=alexcrichton
Bugs in pdflatex (#12804) are preventing the guide from landing (https://github.com/rust-lang/rust/pull/16657). This solves the immediate problem by changing the build system to prefer lualatex, xelatex to pdflatex (which is apparently obsolete). Because the xelatex on the snapshot bot seems to completely ignore the `-output-directory` option, I also had to frob the makefiles a bit for that case.
2014-09-11 07:15:46 +00:00
Vadim Chugunov
d08441b9d6 Fix #17156 2014-09-10 17:11:25 -07:00
bors
9f6d27c39f auto merge of #17135 : brson/rust/wininst, r=alexcrichton
This builds on https://github.com/rust-lang/rust/pull/17109, putting the target triple into the installer name so that we can have both 32-bit and 64-bit.

The resulting installers will be called `rust-0.12.0-pre-x86_64-w64-mingw32.exe`, etc.
2014-09-10 19:25:36 +00:00
bors
6faa4f33a4 auto merge of #17129 : epdtry/rust/misc/llvm-root-reconfig, r=brson
Currently `./configure --llvm-root=...` and similar flags will break incremental builds by forcing reconfiguration on every `make`.  This happens because `reconfig.mk` incorrectly treats submodules in the `-` (uninitialized) state as requiring reconfiguration, and `./configure` deliberately deinitializes unneeded submodules.  The fix is to reconfigure only when submodules are in the `+` state (wrong commit checked out).
2014-09-10 14:20:37 +00:00
bors
4049a4da79 auto merge of #17109 : brson/rust/win64snap, r=alexcrichton 2014-09-10 11:45:44 +00:00
Brian Anderson
7864243380 Prefer lualatex, xelatex, pdflatex, in that order. #12804 2014-09-09 18:07:53 -07:00
Brian Anderson
5206e79b92 Fix naming of windows installer 2014-09-09 13:33:29 -07:00
Brian Anderson
3ebf25ee80 Fix snapshot.py for win64 2014-09-09 13:29:55 -07:00
Stuart Pernsteiner
ba43f7bc8c ignore uninitialized submodules when checking if ./configure should be re-run 2014-09-09 11:33:53 -07:00
Daniel Micay
1ee099da36 enable jemalloc debugging in unoptimized builds
The performance hit from these checks is significant, but unoptimized
builds are already incredibly slow. Enabling these checks results in
better test coverage since there are bots doing unoptimized builds, and
the cost is relatively small in the context of an unoptimized build.
This also allows using `JEMALLOC_FLAGS` to override the default
configure flags.
2014-09-07 14:23:48 -04:00
Kevin Ballard
23c26617cb Avoid building as root with sudo make install
When running `sudo make install`, we only want to run the actual install
as root, the building of the documentation and the distribution folder
should happen as the non-root user.

Related to #13728.
2014-09-04 22:18:19 -07:00
bors
c8e86e977f auto merge of #16322 : michaelwoerister/rust/gdb-pretty, r=alexcrichton
Also extends the autotest framework to let a test case choose if pretty printing should be enabled.
2014-08-30 04:01:24 +00:00
Nick Cameron
cc9b2b0550 Allow a regex filter for RUST_LOG
When specifying RUST_LOG, the programmer may append `/regex` to the end of the spec. All results will then be filtered using that regex.
2014-08-28 10:14:57 +12:00
Michael Woerister
849ae5d881 debuginfo: Emit different autotest debugger scripts depending on GDB version. 2014-08-27 15:19:14 +02:00
Brian Anderson
e59fb9eb62 mk: Don't emit landing pads in stage 0.
Reduces time to build stage0 from 11:30 to 9:40 on my machine.
2014-08-08 16:54:26 -07:00
Vadim Chugunov
9bdaf0b5da Use gcc for cross-build linking, not g++. 2014-08-04 17:43:48 -07:00
Brian Anderson
0ea44fd0aa mk: Add missing colon 2014-08-01 16:48:41 -07:00
bors
b495933a7f auto merge of #16141 : alexcrichton/rust/rollup, r=alexcrichton 2014-08-01 01:56:32 +00:00
Erick Tryzelaar
e1dcbefe52 remove serialize::ebml, add librbml
Our implementation of ebml has diverged from the standard in order
to better serve the needs of the compiler, so it doesn't make much
sense to call what we have ebml anyore. Furthermore, our implementation
is pretty crufty, and should eventually be rewritten into a format
that better suits the needs of the compiler. This patch factors out
serialize::ebml into librbml, otherwise known as the Really Bad
Markup Language. This is a stopgap library that shouldn't be used
by end users, and will eventually be replaced by something better.

[breaking-change]
2014-07-31 07:30:49 -07:00
Michael Neumann
2e2f53fad2 Port Rust to DragonFlyBSD
Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
2014-07-29 16:44:39 +02:00
Brian Anderson
3382ffef32 mk: Print grammar info message like others 2014-07-25 14:32:34 -07:00
Brian Anderson
ae97e6f8d3 mk: Remove check-syntax target
This appears to be redundantly named with a shortcut target for
testing the syntax crate.
2014-07-25 14:28:55 -07:00
Brian Anderson
53543d2aa3 mk: Some fixes to grammar.mk
Invoke rustc in a way that sets LD_LIBRARY_PATH,
and disable the deps on RustLexer.class when antlr isn't available.
2014-07-24 21:34:51 -07:00
Brian Anderson
71f8db5b62 mk: Add comments to primary check targets 2014-07-24 21:34:51 -07:00
Brian Anderson
80b93a3b85 mk: Add check-secondary target for tests with no x-platform risk.
We'll use this to run a subset of the test suite onto a dedicated
bot.

This puts the grammar tests and the pretty-printer tests under
check-secondary. It leanves the pretty tests under plain `check`
for now, until the new bot is added to take over.

Because check-secondary is not run as part of `make check` there
will be a set of tests that most users never run and are only
checked by bors. I think this will be ok because grammar tests
should rarely regress, and the people regressing such tests
should have the fortitude to deal with it.
2014-07-24 21:34:51 -07:00
bors
6203f8ac7b auto merge of #15922 : poiru/rust/remove-whitespace-mk-backslash, r=brson
The alignment of the line continuation backslashes is rather inconsistent. These commits solve that by removing the extra whitespace and adding a space where there previously was none. An alternative solution would be to fix the alignment.
2014-07-24 13:51:17 +00:00
Brian Anderson
e34e86d151 mk: Have the various flavors of 'dist' install all targets by default
Closes #15711
2014-07-23 12:04:29 -07:00
Birunthan Mohanathas
6511053d1c mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
Birunthan Mohanathas
c5433c3a0f mk: Remove extra whitespace before line continuation backslashes 2014-07-23 08:41:55 -07:00
Brian Anderson
ce20571a55 Revert "Made 'make install' include libs for additional targets"
This reverts commit 87334fb05f.

Conflicts:
	mk/install.mk
2014-07-22 17:18:03 -07:00
bors
8d43e4474a auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichton 2014-07-22 07:16:17 +00:00
Corey Richardson
857bb60fe0 Don't run lexer tests by default 2014-07-21 19:26:20 -07:00
Corey Richardson
c41a7dfcc7 Shuffle around check-lexer conditions 2014-07-21 18:38:40 -07:00
Corey Richardson
cbd6799110 lexer tests: makefile/configure 2014-07-21 18:37:17 -07:00
Alex Crichton
a491551597 rustc: Print a smaller hash on -v
The long hash just takes up space and you can discover the main hash through the
`rustc --version verbose` command.
2014-07-21 09:54:10 -07:00
Steve Klabnik
0c30e1faad Include Strings guide with the others.
Three small changes:

1. Re-organize headers in the Strings guide so they show up correctly.
2. build the strings guide with the other docs
3. include the strings guide in the list of guides
2014-07-18 10:48:24 -04:00
klutzy
711e43959a mk: Fix LD_LIBRARY_PATH_ENV_NAMES in cross build 2014-07-16 10:53:15 +09:00
Brian Anderson
cf360f328a Extract librustc_back from librustc 2014-07-14 12:27:07 -07:00
Brian Anderson
d3096c2348 Move llvm bindings to their own crate 2014-07-14 12:27:07 -07:00
bors
f2d251d12e auto merge of #15610 : brson/rust/0.12.0, r=alexcrichton 2014-07-12 18:06:36 +00:00
Brian Anderson
a9cf3233f7 Bump version to 0.12.0-pre 2014-07-11 11:26:58 -07:00
bors
b8059f730e auto merge of #15580 : pnkfelix/rust/fsk-fix-15558, r=alexcrichton
Fix #15558.
2014-07-11 13:51:39 +00:00
Felix S. Klock II
59ab65b2d9 More robust install.sh: do runnability test in fresh subdirectory.
Fix #15558.
2014-07-10 19:18:46 +02:00
bors
7ab9bfab4e auto merge of #15578 : alexcrichton/rust/fix-dist-again, r=pnkfelix
This is already checked by the install script, no need to check it twice.
2014-07-10 15:34:02 +00:00
Alex Crichton
3e49647a49 mk: Don't run rustc manually during distcheck
This is already checked by the install script, no need to check it twice.
2014-07-10 08:09:43 -07:00
bors
898701cb35 auto merge of #15556 : alexcrichton/rust/snapshots, r=brson
Closes #15544
2014-07-10 03:21:30 +00:00
bors
fa7cbb5a46 auto merge of #15283 : kwantam/rust/master, r=alexcrichton
Add libunicode; move unicode functions from core

- created new crate, libunicode, below libstd
- split `Char` trait into `Char` (libcore) and `UnicodeChar` (libunicode)
  - Unicode-aware functions now live in libunicode
    - `is_alphabetic`, `is_XID_start`, `is_XID_continue`, `is_lowercase`,
      `is_uppercase`, `is_whitespace`, `is_alphanumeric`, `is_control`, `is_digit`,
      `to_uppercase`, `to_lowercase`
  - added `width` method in UnicodeChar trait
    - determines printed width of character in columns, or None if it is a non-NULL control character
    - takes a boolean argument indicating whether the present context is CJK or not (characters with 'A'mbiguous widths are double-wide in CJK contexts, single-wide otherwise)
- split `StrSlice` into `StrSlice` (libcore) and `UnicodeStrSlice` (libunicode)
  - functionality formerly in `StrSlice` that relied upon Unicode functionality from `Char` is now in `UnicodeStrSlice`
    - `words`, `is_whitespace`, `is_alphanumeric`, `trim`, `trim_left`, `trim_right`
  - also moved `Words` type alias into libunicode because `words` method is in `UnicodeStrSlice`
- unified Unicode tables from libcollections, libcore, and libregex into libunicode
- updated `unicode.py` in `src/etc` to generate aforementioned tables
- generated new tables based on latest Unicode data
- added `UnicodeChar` and `UnicodeStrSlice` traits to prelude
- libunicode is now the collection point for the `std::char` module, combining the libunicode functionality with the `Char` functionality from libcore
  - thus, moved doc comment for `char` from `core::char` to `unicode::char`
- libcollections remains the collection point for `std::str`

The Unicode-aware functions that previously lived in the `Char` and `StrSlice` traits are no longer available to programs that only use libcore. To regain use of these methods, include the libunicode crate and `use` the `UnicodeChar` and/or `UnicodeStrSlice` traits:

    extern crate unicode;
    use unicode::UnicodeChar;
    use unicode::UnicodeStrSlice;
    use unicode::Words; // if you want to use the words() method

NOTE: this does *not* impact programs that use libstd, since UnicodeChar and UnicodeStrSlice have been added to the prelude.

closes #15224
[breaking-change]
2014-07-09 18:36:30 +00:00
Alex Crichton
0c71e0c596 Register new snapshots
Closes #15544
2014-07-09 10:57:58 -07:00
kwantam
85e2bee4a2 fix test failures
- unicode tests live in coretest crate
- libcollections str tests need UnicodeChar trait.
- libregex perlw tests were checking a char in the Alphabetic category,
  \x2161. Confirmed perl 5.18 considers this a \w character. Changed to
  \x2961, which is not \w as the test expects.
2014-07-09 10:14:46 -04:00
bors
206dd91742 auto merge of #14832 : alexcrichton/rust/no-rpath, r=brson
This commit disables rustc's emission of rpath attributes into dynamic libraries
and executables by default. The functionality is still preserved, but it must
now be manually enabled via a `-C rpath` flag.

This involved a few changes to the local build system:

* --disable-rpath is now the default configure option
* Makefiles now prefer our own LD_LIBRARY_PATH over the user's LD_LIBRARY_PATH
  in order to support building rust with rust already installed.
* The compiletest program was taught to correctly pass through the aux dir as a
  component of LD_LIBRARY_PATH in more situations.

The major impact of this change is that neither rustdoc nor rustc will work
out-of-the-box in all situations because they are dynamically linked. It must be
arranged to ensure that the libraries of a rust installation are part of the
LD_LIBRARY_PATH. The default installation paths for all platforms ensure this,
but if an installation is in a nonstandard location, then configuration may be
necessary.

Additionally, for all developers of rustc, it will no longer be possible to run
$target/stageN/bin/rustc out-of-the-box. The old behavior can be regained
through the `--enable-rpath` option to the configure script.

This change brings linux/mac installations in line with windows installations
where rpath is not possible.

Closes #11747
[breaking-change]
2014-07-08 22:51:39 +00:00
Brian Anderson
8121c39a3e mk: Run tidy after tests in 'make check'
Tidy takes like forever to run.
2014-07-07 18:02:59 -07:00
kwantam
5d4238b6fc Add libunicode; move unicode functions from core
- created new crate, libunicode, below libstd
- split Char trait into Char (libcore) and UnicodeChar (libunicode)
  - Unicode-aware functions now live in libunicode
    - is_alphabetic, is_XID_start, is_XID_continue, is_lowercase,
      is_uppercase, is_whitespace, is_alphanumeric, is_control,
      is_digit, to_uppercase, to_lowercase
  - added width method in UnicodeChar trait
    - determines printed width of character in columns, or None if it is
      a non-NULL control character
    - takes a boolean argument indicating whether the present context is
      CJK or not (characters with 'A'mbiguous widths are double-wide in
      CJK contexts, single-wide otherwise)
- split StrSlice into StrSlice (libcore) and UnicodeStrSlice
  (libunicode)
  - functionality formerly in StrSlice that relied upon Unicode
    functionality from Char is now in UnicodeStrSlice
    - words, is_whitespace, is_alphanumeric, trim, trim_left, trim_right
  - also moved Words type alias into libunicode because words method is
    in UnicodeStrSlice
- unified Unicode tables from libcollections, libcore, and libregex into
  libunicode
- updated unicode.py in src/etc to generate aforementioned tables
- generated new tables based on latest Unicode data
- added UnicodeChar and UnicodeStrSlice traits to prelude
- libunicode is now the collection point for the std::char module,
  combining the libunicode functionality with the Char functionality
  from libcore
  - thus, moved doc comment for char from core::char to unicode::char
- libcollections remains the collection point for std::str

The Unicode-aware functions that previously lived in the Char and
StrSlice traits are no longer available to programs that only use
libcore. To regain use of these methods, include the libunicode crate
and use the UnicodeChar and/or UnicodeStrSlice traits:

    extern crate unicode;
    use unicode::UnicodeChar;
    use unicode::UnicodeStrSlice;
    use unicode::Words; // if you want to use the words() method

NOTE: this does *not* impact programs that use libstd, since UnicodeChar
and UnicodeStrSlice have been added to the prelude.

closes #15224
[breaking-change]
2014-07-07 14:52:24 -04:00