Commit Graph

389 Commits

Author SHA1 Message Date
Huon Wilson 532cd5f85a Separate most of rustc::lint::builtin into a separate crate.
This pulls out the implementations of most built-in lints into a
separate crate, to reduce edit-compile-test iteration times with
librustc_lint and increase parallelism. This should enable lints to be
refactored, added and deleted much more easily as it slashes the
edit-compile cycle to get a minimal working compiler to test with (`make
rustc-stage1`) from

    librustc -> librustc_typeck -> ... -> librustc_driver ->
        libcore -> ... -> libstd

to

    librustc_lint -> librustc_driver -> libcore -> ... libstd

which is significantly faster, mainly due to avoiding the librustc build
itself.

The intention would be to move as much as possible of the infrastructure
into the crate too, but the plumbing is deeply intertwined with librustc
itself at the moment. Also, there are lints for which diagnostics are
registered directly in the compiler code, not in their own crate
traversal, and their definitions have to remain in librustc.

This is a [breaking-change] for direct users of the compiler APIs:
callers of `rustc::session::build_session` or
`rustc::session::build_session_` need to manually call
`rustc_lint::register_builtins` on their return value.

This should make #22206 easier.
2015-02-28 15:33:59 +11:00
Alex Crichton c5fddd81ab rollup merge of #22118: fhahn/separate-parse-fail-2
After making `rustc` fail on errors at a stop point, like `-Z parse-only`, in #22117, the files in this PR also fail during the parse stage and should be moved as well. Sorry for spliting this move up in two PRs.
2015-02-18 14:31:23 -08:00
bors 6c065fc8cb Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichton
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773)
- Fix & enable debuginfo tests for android (#10381)
- Fix & enable more tests for android (both for arm/aarch64)
- Enable many already-pass tests on android (both for arm/aarch64)
2015-02-17 19:35:12 +00:00
Florian Hahn 6824f1365d Add pfail targets for parse-fail tests 2015-02-16 20:52:39 +01:00
Florian Hahn ff1181da15 Only set --bench for crate tests when PLEASE_BENCH is set
closes #22291
2015-02-14 23:10:56 +01:00
Eunji Jeong 489f60461c Remove duplicated configuration for android 2015-02-10 21:53:33 +09:00
Eunji Jeong abd7fd924b Add one more depth on android test directory for multiple targets 2015-02-10 21:53:31 +09:00
Eunji Jeong 5cbdf1db9b Make aarch64-linux-android check with real target 2015-02-10 15:48:05 +09:00
Florian Hahn 01db9a46af Move compile-fail tests that are rejected by the parser to parse-fail 2015-02-06 22:23:16 +01:00
Brian Anderson 1364919b6c mk: Print test summary after tidy when running 'make check' 2015-02-05 14:37:17 -08:00
Brian Anderson 29be938136 mk: Remove redundant valgrind notices in build 2015-02-05 14:37:16 -08:00
Brian Anderson 290b79c15d Clean up tidy scripts, coverage, performance
This restructures tidy.py to walk the tree itself,
and improves performance considerably by not loading entire
files into buffers for licenseck.

Splits build rules into 'tidy', 'tidy-basic', 'tidy-binaries',
'tidy-errors', 'tidy-features'.
2015-02-05 14:37:16 -08:00
Brian Anderson 1ce86651c7 mk: Split tidy into multiple tidy rules
* tidy - runs all tidy scripts
* tidy-basic - tidy.rs
* tidy-binaries - check-binaries.py
* tidy-errors - errorck.py
* tidy-features - featureck.py
2015-02-05 14:37:16 -08:00
Brian Anderson 63fcbcf3ce Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	mk/tests.mk
	src/liballoc/arc.rs
	src/liballoc/boxed.rs
	src/liballoc/rc.rs
	src/libcollections/bit.rs
	src/libcollections/btree/map.rs
	src/libcollections/btree/set.rs
	src/libcollections/dlist.rs
	src/libcollections/ring_buf.rs
	src/libcollections/slice.rs
	src/libcollections/str.rs
	src/libcollections/string.rs
	src/libcollections/vec.rs
	src/libcollections/vec_map.rs
	src/libcore/any.rs
	src/libcore/array.rs
	src/libcore/borrow.rs
	src/libcore/error.rs
	src/libcore/fmt/mod.rs
	src/libcore/iter.rs
	src/libcore/marker.rs
	src/libcore/ops.rs
	src/libcore/result.rs
	src/libcore/slice.rs
	src/libcore/str/mod.rs
	src/libregex/lib.rs
	src/libregex/re.rs
	src/librustc/lint/builtin.rs
	src/libstd/collections/hash/map.rs
	src/libstd/collections/hash/set.rs
	src/libstd/sync/mpsc/mod.rs
	src/libstd/sync/mutex.rs
	src/libstd/sync/poison.rs
	src/libstd/sync/rwlock.rs
	src/libsyntax/feature_gate.rs
	src/libsyntax/test.rs
2015-01-25 01:20:55 -08:00
Brian Anderson 0768892abe Minor fixes 2015-01-21 16:16:22 -08:00
Brian Anderson 11f4d62a06 Add a lint for library features
Does a sanity check of the version numbers.
2015-01-21 16:16:21 -08:00
Alex Crichton b250d9a3c8 rollup merge of #21289: brson/errorcodes
This does the bare minimum to make registration of error codes work again. After this patch, every call to `span_err!` with an error code gets that error code validated against a list in that crate and a new tidy script `errorck.py` validates that no error codes are duplicated globally.

There are further improvements to be made yet, detailed in #19624.

r? @nikomatsakis
2015-01-21 09:13:46 -08:00
Brian Anderson 953d6dfd7e Make error code registration work again. #19624 2015-01-20 11:27:14 -08:00
Barosl LEE 5b57aa757b Rollup merge of #21399 - kballard:fix-PLEASE_BENCH, r=Gankro
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-21 02:16:52 +09:00
Kevin Ballard c166017445 Fix `make check PLEASE_BENCH=1`
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-19 10:59:57 -08:00
Kang Seonghoon de6f520192 tests: Add htmldocck.py script for the use of Rustdoc tests.
The script is intended as a tool for doing every sort of verifications
amenable to Rustdoc's HTML output. For example, link checkers would go
to this script. It already parses HTML into a document tree form (with
a slight caveat), so future tests can make use of it.

As an example, relevant `rustdoc-*` run-make tests have been updated
to use `htmldocck.py` and got their `verify.sh` removed. In the future
they may go to a dedicated directory with htmldocck running by default.
The detailed explanation of test scripts is provided as a docstring of
htmldocck.

cc #19723
2015-01-18 02:42:15 +09: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 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
Alex Crichton cb7599b83e rollup merge of #20317: brson/rust-installer-v2 2014-12-29 19:47:58 -08:00
Brian Anderson 4f2ab2bf46 Upgrade rust-installer to v2 2014-12-29 17:26:02 -08: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
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
Eduard Burtescu c54fc980f3 Split resolve from rustc::middle into rustc_resolve. 2014-12-20 07:28:47 +02: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
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
Niko Matsakis 2854d1bfc2 Separate borrowck into its own crate and remove dead code as well. 2014-12-13 06:01:19 -05: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
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
Richard Diamond ce507c6c22 Don't forget the tests. 2014-11-25 19:05:28 -06: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
Michael Woerister 2f215f644f debuginfo: Make LLDB test make targets dependent on lldb python scripts. 2014-11-05 13:32:09 +01: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
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
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