Commit Graph

1884 Commits

Author SHA1 Message Date
Alex Crichton cb3071b273 mk: Update `make dist` for MSVC targets
This commit updates the `dist` target for MSVC to not build the mingw components
and to also ensure that the `llvm-ar.exe` binary is ferried along into the right
location for installs.
2015-05-19 10:53:07 -07:00
Alex Crichton b538189ba0 mk: Generate a .def file for rustc_llvm on MSVC
Windows needs explicit exports of functions from DLLs but LLVM does not mention
any of its symbols as being export-able from a DLL. The compiler, however,
relies on being able to use LLVM symbols across DLL boundaries so we need to
force many of LLVM's symbols to be exported from `rustc_llvm.dll`. This commit
adds support for generation of a `rustc_llvm.def` file which is passed along to
the linker when generating `rustc_llvm.dll` which should keep all these symbols
exportable and usable.
2015-05-19 10:53:07 -07:00
Alex Crichton a4ef308473 mk: Add the ability to depend on native LLVM tools
The compiler will require that `llvm-ar.exe` be available for MSVC-targeting
builds (more comments on this soon), so this commit adds support for targets to
depend on LLVM tools. The `core` library for MSVC depends on `llvm-ar.exe` which
will be copied into place for the target before the compiler starts to run.

Note that these targets all depend on `llvm-config.exe` to ensure that they're
built before they're attempted to be copied.
2015-05-19 10:53:04 -07:00
Alex Crichton 6122a5f559 mk: Fix MSVC build for rustllvm.lib
This commit updates the rustllvm.mk file with the necessary flags and such to
build rustllvm.lib with cl.exe instead of gcc. Some comments can be found in the
commit itself.
2015-05-19 10:52:57 -07:00
Alex Crichton 64412a49be mk: Fix building compiler-rt on MSVC
It looks like compiler-rt has a cmake build sytem inside its source, but I have
been unable to figure out how to use it and actually build the right library.
For now this commit hard-wires MSVC-targeting builds of libcompiler-rt to
continue using `make` as the primary bulid system, but some frobbing of the
flags are necessary to ensure that the right compiler is used.
2015-05-19 10:52:57 -07:00
Alex Crichton ee64bab76c mk: Don't add cross prefixes for MSVC
Currently the MSVC compilers don't have any cross prefixes and we're only able
to make an MSVC compiler with a cross compile, so just avoid this logic on msvc
for now.
2015-05-19 10:52:57 -07:00
Alex Crichton fcf7ecd1d7 mk: Add build system support for cl.exe
We have a number of support C/C++ files in Rust that we link into the standard
library and other various locations, and these all need to be built with cl.exe
instead of gcc.exe when targeting MSVC. This commit adds helper macros for this
functionality to use different sets of programs/flags/invocations on MSVC than
on GNU-like platforms.
2015-05-19 10:52:57 -07:00
Alex Crichton b56d47cc80 mk: Enable building LLVM targeting MSVC
This commit modifies the makefiles to enable building LLVM with cmake and Visual
Studio to generate an LLVM that targets MSVC. Rust's configure script requires
cmake to be installed when targeting MSVC and will configure LLVM with cmake
instead of the normal `./configure` script LLVM provides. The build will then
run cmake to execute the build instead of the normal `make`.

Currently `make clean-llvm` isn't supported on MSVC as I can't figure out how to
run a "clean" target for the Visual Studio files.
2015-05-19 10:52:57 -07:00
Alex Crichton 7cf0b1798b configure: Start adding MSVC support
This commit starts to add MSVC support to the ./configure script to enable the
build system to detect and build an MSVC target with the cl.exe compiler and
toolchain. The primary change here is a large sanity check when an MSVC target
is requested (and currently only `x86_64-pc-windows-msvc` is recognized).

When building an MSVC target, the configure script either requires the
`--msvc-root` argument or for `cl.exe` to be in `PATH`. It also requires that if
in the path `cl.exe` is the 64-bit version of the compiler.

Once detected the configure script will run the `vcvarsall.bat` script provided
by Visual Studio to learn about the `INCLUDE` and `LIB` variables needed by the
`cl.exe` compiler to run (the default include/lib paths for the
compiler/linker). These variables are then reexported when running `make` to
ensure that our own compiles are running the same toolchain.

The purpose of this detection and environment variable scraping is to avoid
requiring the build itself to be run inside of a `cmd.exe` shell but rather
allow it to run in the currently expected MinGW/MSYS shell.
2015-05-19 10:52:55 -07:00
Alex Crichton ee258c548f mk: Fix native LLVM deps for cross-host builds
We use a script called `mklldeps.py` to run `llvm-config` to generate a list
of LLVM libraries and native dependencies needed by LLVM, but all cross-compiled
LLVM builds were using the *host triple's* `llvm-config` instead of the
*target's* `llvm-config`. This commit alters this to require the right
`llvmdeps.rs` to be generated which will run the correct `llvm-config`.
2015-05-19 10:36:00 -07:00
Alex Crichton 150663c3b6 mk: Correct names of installed libs on windows
Previously libmorestack.a and libcompiler-rt.a were installed, but link.exe
looks for morestack.lib and compiler-rt.lib by default, so we need to install
these with the correct name
2015-05-19 10:36:00 -07:00
Alex Crichton eb5bf151a5 mk: Remove generation of .d files
Looks like cl.exe doesn't support this and we're also barely using them anyway
as we have very few header files and C code in general.
2015-05-19 10:36:00 -07:00
Brian Anderson 6149e32b0b Bump version to 1.2 2015-05-15 11:24:00 -07:00
bors e5394240a2 Auto merge of #25208 - lfairy:version-hash, r=brson
The code takes a prefix of the MD5 hash of the version string.

Since the hash command differs across GNU and BSD platforms, we scan for
the right one in the configure script.

Closes #25007
2015-05-14 00:42:32 +00:00
Chris Wong 2c0db5e331 Use `printf %s` instead of `echo -n` in build script
According to POSIX, the behavior of `echo -n` is "implementation
defined". So we can't guarantee that it gives the same result
everywhere.

See also:
* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
* http://unix.stackexchange.com/q/65803/9814
2015-05-13 10:17:59 +12:00
Alex Crichton 4cc025d83c Scale back changes made 2015-05-12 14:50:36 -07:00
Ricky Taylor 315750ac92 Very hacky MSVC hacks.
Conflicts:
	mk/platform.mk
	src/librustc/session/config.rs
	src/librustc_back/target/aarch64_apple_ios.rs
	src/librustc_back/target/aarch64_linux_android.rs
	src/librustc_back/target/arm_linux_androideabi.rs
	src/librustc_back/target/arm_unknown_linux_gnueabi.rs
	src/librustc_back/target/arm_unknown_linux_gnueabihf.rs
	src/librustc_back/target/armv7_apple_ios.rs
	src/librustc_back/target/armv7s_apple_ios.rs
	src/librustc_back/target/i386_apple_ios.rs
	src/librustc_back/target/i686_apple_darwin.rs
	src/librustc_back/target/i686_pc_windows_gnu.rs
	src/librustc_back/target/i686_unknown_dragonfly.rs
	src/librustc_back/target/i686_unknown_linux_gnu.rs
	src/librustc_back/target/mips_unknown_linux_gnu.rs
	src/librustc_back/target/mipsel_unknown_linux_gnu.rs
	src/librustc_back/target/mod.rs
	src/librustc_back/target/powerpc_unknown_linux_gnu.rs
	src/librustc_back/target/x86_64_apple_darwin.rs
	src/librustc_back/target/x86_64_apple_ios.rs
	src/librustc_back/target/x86_64_pc_windows_gnu.rs
	src/librustc_back/target/x86_64_unknown_dragonfly.rs
	src/librustc_back/target/x86_64_unknown_freebsd.rs
	src/librustc_back/target/x86_64_unknown_linux_gnu.rs
	src/librustc_back/target/x86_64_unknown_openbsd.rs
	src/librustc_llvm/lib.rs
	src/librustc_trans/back/link.rs
	src/librustc_trans/trans/base.rs
	src/libstd/os.rs
	src/rustllvm/RustWrapper.cpp
2015-05-12 14:50:36 -07:00
bors 8c9dc18355 Auto merge of #24859 - richo:valgrind-tests, r=brson
This stung me more than once in dev.

Bonus DRY'ing up of configure that I did on my way past.
2015-05-09 02:07:18 +00:00
Richo Healey 01fc026440 mk: Log that valgrind tests are disabled 2015-05-08 10:49:02 -07:00
Alex Crichton 00204e8a83 mk: Add a missing folder to the dist directory
This fixes the `distcheck` target and nightly builds.
2015-05-08 09:45:16 -07:00
Chris Wong 535040aab8 Generate CFG_FILENAME_EXTRA from the version
The code takes a prefix of the MD5 hash of the version string.

Since the hash command differs across GNU and BSD platforms, we scan for
the right one in the configure script.

Closes #25007
2015-05-08 22:26:26 +12:00
Michael Sproul b9d484ff8c Error index style tweaks. 2015-05-05 11:17:00 +10:00
Michael Sproul 1174114356 Add error index generator. 2015-05-03 22:08:25 +10:00
Felix S. Klock II bd4b984537 add `--enable-debuginfo-tests`, analogous to `--disable-optimize-tests`.
Then, decouple the question of whether the compiler/stdlib carry
debuginfo (which is controlled via `--enable-debuginfo` and implied by
`--enable-debug`) from the question of whether the tests carry
debuginfo (which now no longer is implied by `--enable-debug` nor
`--enable-debuginfo`, and is off by default).
2015-04-29 17:18:44 +02:00
bors cadc67e8fd Auto merge of #24777 - alexcrichton:musl, r=brson
These commits build on [some great work on reddit](http://www.reddit.com/r/rust/comments/33boew/weekend_experiment_link_rust_programs_against/) for adding MUSL support to the compiler. This goal of this PR is to enable a `--target x86_64-unknown-linux-musl` argument to the compiler to work A-OK. The outcome here is that there are 0 compile-time dependencies for a MUSL-targeting build *except for a linker*. Currently this also assumes that MUSL is being used for statically linked binaries so there is no support for dynamically linked binaries with MUSL.

MUSL support largely just entailed munging around with the linker and where libs are located, and the major highlights are:

* The entirety of `libc.a` is included in `liblibc.rlib` (statically included as an archive).
* The entirety of `libunwind.a` is included in `libstd.rlib` (like with liblibc).
* The target specification for MUSL passes a number of ... flavorful options! Each option is documented in the relevant commit.
* The entire test suite currently passes with MUSL as a target, except for:
  * Dynamic linking tests are all ignored as it's not supported with MUSL
  * Stack overflow detection is not working MUSL yet (I'm not sure why)
* There is a language change included in this PR to add a `target_env` `#[cfg]` directive. This is used to conditionally build code for only MUSL (or for linux distros not MUSL). I highly suspect that this will also be used by Windows to target MSVC instead of a MinGW-based toolchain.

To build a compiler targeting MUSL you need to follow these steps:

1. Clone the current MUSL repo from `git://git.musl-libc.org/musl`. Build this as usual and install it.
2. Clone and build LLVM's [libcxxabi](http://libcxxabi.llvm.org/) library. Only the `libunwind.a` artifact is needed. I have tried using upstream libunwind's source repo but I have not gotten unwinding to work with it unfortunately. Move `libunwind.a` adjacent to MUSL's `libc.a`
3. Configure a Rust checkout with `--target=x86_64-unknown-linux-musl --musl-root=$MUSL_ROOT` where `MUSL_ROOT` is where you installed MUSL in step 1.

I hope to improve building a copy of libunwind as it's still a little sketchy and difficult to do today, but other than that everything should "just work"! This PR is not intended to include 100% comprehensive support for MUSL, as future modifications will probably be necessary.
2015-04-28 20:12:59 +00:00
Alex Crichton 247842b741 test: Fix some tests to run with musl
There were a few test cases to fix:

* Dynamic libraries are not supported with MUSL right now, so all of those
  related test which force or require dylibs are ignored.
* Looks like the default stack for MUSL is smaller than glibc, so a few stack
  allocations in benchmarks were boxed up (shouldn't have a perf impact).
* Some small linkage tweaks here and there
* Out-of-stack detection does not currently work with MUSL
2015-04-28 09:35:22 -07:00
Alex Crichton cd980b3bee mk: Add support for musl-based builds
This commit adds support to the makefiles, configuration script, and build
system to understand MUSL. This is broken up into a few parts:

* Any target of the form `*-musl` requires the `--musl-root` option to
  `./configure` which will indicate the root of the MUSL installation. It is
  also expected that there is a libunwind build inside of that installation
  built against that MUSL.

* Objects from MUSL are copied into the build tree for Rust to be statically
  linked into the appropriate Rust library.

* Objects for binary startup and shutdown are included in each Rust installation
  by default for MUSL. This requires MUSL to only be installed on the machine
  compiling rust. Only a linker will be necessary for compiling against MUSL on
  a target machine.

Eventually a MUSL and/or libunwind build may be integrated by default into the
build but for now they are just always assumed to exist externally.
2015-04-27 10:11:15 -07:00
Alex Crichton 681fc82456 mk: Remove a bunch of unused directives 2015-04-27 09:22:05 -07:00
Ryan Prichard 5e37729036 Add a new test group, rfail-full that runs rfail tests with fulldeps.
In most places in mk/tests.mk, it's positioned after rpass-full and
before cfail-full (because rfail comes before cfail). The order of tests
seems a little inconsistent, but reordering everywhere would obscure this
commit.
2015-04-26 06:05:38 -07:00
bors 69e47c77b2 Auto merge of #24537 - rprichard:fix-parallel-check, r=alexcrichton
This required fixing the `pretty-rpass-full` tests to have the same `$$(CSREQ$(1)_T_$(2)_H_$(3))`  dependencies as the `rpass-full` and `cfail-full` tests.  It also required fixing the `run-make/simd-ffi` test to use unique names for its output files.
2015-04-23 17:32:16 +00:00
Ryan Prichard b7ab2aeebd Fix the dependency for the pretty-rpass-full tests
The current code attempts to define the
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work,
because $(1) and $(3) are not inside a function. Moreover, there is a test
(run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not
an indirect dependency of librustc or libsyntax. Listing all the
dependencies will be hard to maintain, but there's a better way to do
this...

As with the rpass-full and cfail-full tests, add dependencies using the
$$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of
host and target crates, built for a particular stage and host. We use
T_$(3), not T_$(2), because we only build LLVM for host triples (not
target triples), so we can only build rustc_llvm for host triples. The
fulldeps tests that use plugins need host rustc crates, whereas fulldeps
tests that link against rustc and run should be skipped for
cross-compilation (such as Android).

Fixes #22021
2015-04-22 20:26:19 -07:00
Brian Anderson 193461c63a mk: Remove version numbers from beta artifacts
Instead of rustc-1.0.0-beta-$triple.tar.gz, betas will be named
rustc-beta-$triple.tar.gz. This will give betas a stable download
URL, prevent old artifacts from accumulating in the dist server's
root directory, and not require the website to be updated every
beta.

As a tradeoff, it will be harder to download previous betas because
they will need to be located in the archives.
2015-04-22 08:51:39 -07:00
Brian Anderson 5c70ff09da Bump version to 1.1.0
Also reset the prerelease number to ".1"
2015-04-21 10:51:53 -07:00
Manish Goregaokar 93d8ba2906 Rollup merge of #24532 - brson:beta, r=pnkfelix 2015-04-18 23:29:57 +05:30
bors a81ce5f991 Auto merge of #24528 - tamird:valgrind-sched, r=alexcrichton
r? @brson
2015-04-18 14:38:44 +00:00
bors 7a5754b330 Auto merge of #24428 - kwantam:deprecate_unicode_fns, r=alexcrichton
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-18 07:09:22 +00:00
Brian Anderson a5e53472c7 Bump prerelease to .3 2015-04-17 10:00:37 -07:00
Tamir Duberstein 1dee7b0160 Run valgrind with fair scheduling when available
Closes #3914.
2015-04-17 07:45:16 -07:00
Niko Matsakis 966e53d8b6 Add librustc_data_structures crate 2015-04-17 10:12:53 -04:00
kwantam 29d1252e4d deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-16 17:03:05 -04:00
bors 5dc8060e3f Auto merge of #24287 - brson:beta, r=steveklabnik
r? @steveklabnik

Should land this, https://github.com/rust-lang/rust/pull/24270, and https://github.com/rust-lang/rust/pull/24245 before rolling another beta.
2015-04-14 04:42:06 +00:00
Richo Healey 7a1d726696 mk: Add a printer helper to the make setup
Also add docs because not being able to discover these things is the
pits.
2015-04-10 17:10:03 -07:00
Brian Anderson 2cf7bc3e3d Bump prerelease version 2015-04-10 10:12:27 -07:00
bors c897ac04e2 Auto merge of #24177 - alexcrichton:rustdoc, r=aturon
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable).

I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
2015-04-10 16:18:44 +00:00
Brian Anderson 6d17c35cd5 configure: Add --enable-debug-jemalloc 2015-04-08 15:12:08 -07:00
Brian Anderson 7cbf823353 configure: Add --enable-debuginfo 2015-04-08 13:57:37 -07:00
Brian Anderson 1b34f0aef0 configure: Clarify --enable-debug-assertions status message 2015-04-08 13:31:26 -07:00
Brian Anderson 59e332bd2f configure: Disable debug assertions by default 2015-04-08 13:23:44 -07:00
Brian Anderson ed8eebd99b configure: Rename --enable-debug to --enable-debug-assertions 2015-04-08 13:22:56 -07:00
Brian Anderson bc9f16c599 configure: Remove obsolete --disable-verify option
rust-installer never verifies.
2015-04-08 12:16:47 -07:00
Alex Crichton ed276caeec mk: Stop documenating non-facade crates
This commit ceases documentation-by-default of crates such as `term`,
`serialize`, and `alloc`. Crates like `term` and `rand` have duplicates on
`crates.io` and the search index entries generated in the local tree end up
only leading to confusion. Crates like the entire compiler infrastructure,
`flate`, or `rbml` don't need to be documented in such a prominent location.

This change also means that doc tests will no longer be run for crates beyond
the facade (e.g. `serialize` or `term`), but there were very few doc tests in
there to begin with.

Closes #22168
2015-04-07 17:54:34 -07:00
Alex Crichton c9c7be78db mk: Pass the same flags to rustdoc as rustc
This ensures that def ids don't drift too much over time.

Closes #15309
2015-04-07 17:54:33 -07:00
Alex Crichton d3647fe815 test: Move all run-make rustdoc tests to test/rustdoc 2015-04-07 17:54:33 -07:00
Alex Crichton 10359de405 compiletest: Add support for running rustdoc tests
Add a new test directory called 'rustdoc' where all files inside are documented
and run against the `htmldocck` script to have assertions about the output.
2015-04-07 17:54:33 -07:00
bors d754722a04 Auto merge of #23678 - richo:check-flightcheck, r=alexcrichton
Rationale for this, is that I lurked `ulimit -c unlimited` into my .profile to debug an unrelated crash, that I kept forgetting to set before hand. I then ran the test suite and discovered that I had 150 gigs of core dumps in `/cores`.

Very open to another approach, or to setting the limit to something higher than 0, but I think it would be nice if the build system tried to save you from yourself here.
2015-03-31 18:26:20 +00:00
Manish Goregaokar db76327ef6 Rollup merge of #23874 - cmr:no-compiler-docs, r=alexcrichton
r? @alexcrichton
2015-03-31 09:04:39 +05:30
Corey Richardson b314fedc4a mk: build and distribute facade crates unconditionally (for now) 2015-03-30 19:18:47 -04:00
bors 14192d6df5 Auto merge of #23848 - cmr:no-compiler-docs, r=huonw
This saves a bunch of a time and will make distributions smaller, as well as
avoiding filling the implementors page with internal garbage. Turn it back on
with `--enable-compiler-docs` if you want them.

(Crates behind the facade are not documented at all)

[breaking-change]
2015-03-30 11:35:52 +00:00
Corey Richardson e64b677ca6 mk: don't build docs for internal or behind-the-facade crates in beta/stable
This saves a bunch of a time and will make distributions smaller, as well as
avoiding filling the implementors page with internal garbage. Turn it back on
with `--enable-compiler-docs` if you want compiler docs during development.

Crates behind the facade are only documented on nightly/dev builds (where they
can be used).

[breaking-change]

Closes #23772
Closes #21297
2015-03-29 06:15:51 -04:00
Vadim Petrochenkov 1accaa9f86 Fix some typos 2015-03-28 18:09:51 +03:00
Richo Healey 7a4615e447 check: Warn users with nonzero RLIMIT_CORE 2015-03-27 16:50:37 -07:00
Sae-bom Kim a99936b397 make it use gdb instead of lldb when mac-android cross compile 2015-03-25 18:12:35 +09:00
Manish Goregaokar fad4c380e8 Rollup merge of #23385 - tamird:cleanup-whitespace, r=alexcrichton
r? @alexcrichton

Conflicts:
	src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs
2015-03-17 15:21:22 +05:30
bors 883551b1d7 Auto merge of #23429 - rprichard:fix-linux-build, r=alexcrichton
The RUST_TARGET_STAGE_N rule uses LLVM_LIBDIR_RUSTFLAGS_<target-triple>,
which expands to -L "$(llvm-config --libdir)" when the target-triple is
also a host-triple. Rather than expand to -L "" if llvm-config has not yet
been built, add a dependency on the target llvm-config.

When the target-triple is not a host-triple, the new LLVM_CONFIG_$(2)
dependency should expand to nothing.

r? alexcrichton
2015-03-17 05:57:14 +00:00
Ryan Prichard b07a1dfcd1 Fix the Linux nightly build by adding a LLVM_CONFIG_<target-triple> dep.
The RUST_TARGET_STAGE_N rule uses LLVM_LIBDIR_RUSTFLAGS_<target-triple>,
which expands to -L "$(llvm-config --libdir)" when the target-triple is
also a host-triple. Rather than expand to -L "" if llvm-config has not yet
been built, add a dependency on the target llvm-config.

When the target-triple is not a host-triple, the new LLVM_CONFIG_$(2)
dependency should expand to nothing.
2015-03-16 21:13:36 -07:00
Jorge Aparicio 3ab26f8469 join lines in makefile 2015-03-16 21:57:43 -05:00
Jorge Aparicio cb5e429291 move some tests back to libcollections 2015-03-16 21:57:42 -05:00
Jorge Aparicio 6453fcd4cc extract libcollections tests into libcollectionstest 2015-03-16 21:57:42 -05:00
Tamir Duberstein d51047ded0 Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
Ryan Prichard 00211ecfda Avoid passing -L "" during cross-compilation.
LLVM_LIBDIR_<triple> is only defined for host triples, not target triples.

FWIW, the same is true for LLVM_STDCPP_RUSTFLAGS_<triple>, where we
explicitly define it as empty when --enable-llvm-static-stdcpp is not
specified, but it's still undefined for cross-compiled triples.
2015-03-13 16:46:45 -07:00
Manish Goregaokar 0e4b8d6117 Rollup merge of #23324 - rprichard:fix-freebsd, r=brson
Currently, target.mk passes -L \"\" when LLVM_STDCPP_LOCATION_$(2) is empty.

This fixes #23287.
2015-03-13 18:11:57 +05:30
Brian Anderson ebcb1dca43 Fix naming of beta artifacts again 2015-03-12 17:37:51 -07:00
Ryan Prichard de52403295 Avoid passing -L "" to rustc.
Currently, target.mk passes -L "" when LLVM_STDCPP_LOCATION_$(2) is empty.

This fixes #23287.
2015-03-12 04:09:12 -07:00
Cody P Schafer 100e1a93dc mk/tests: filter more possible debug-assertions 2015-03-11 15:25:32 -04:00
Cody P Schafer fbc10c3851 configure: have --enable-debug set -C debug-assertions=on so `debug!()` works again 2015-03-10 14:06:59 -04:00
Manish Goregaokar 88cef035b0 Rollup merge of #23094 - brson:beta, r=huonw
No more alphas, please.
2015-03-06 22:22:35 +05:30
Brian Anderson 614853734e mk: Once again rename the beta channel artifacts as 'beta'
No more alphas, please.
2015-03-05 15:29:10 -08:00
Alex Crichton d5d834551c rustc: Add a debug_assertions #[cfg] directive
This commit is an implementation of [RFC 563][rfc] which adds a new
`cfg(debug_assertions)` directive which is specially recognized and calculated
by the compiler. The flag is turned off at any optimization level greater than 1
and may also be explicitly controlled through the `-C debug-assertions`
flag.

[rfc]: https://github.com/rust-lang/rfcs/pull/563

The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of
the `ndebug` variable and `ndebug` no longer holds any meaning to the standard
library.

Code which was previously relying on `not(ndebug)` to gate expensive code should
be updated to rely on `debug_assertions` instead.

Closes #22492
[breaking-change]
2015-03-05 14:51:38 -08:00
Alex Crichton 95d904625b std: Deprecate std::old_io::fs
This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.
2015-03-04 15:59:30 -08:00
Felix S. Klock II 62aa899e3d Make build timestamp files robust in face of concurrent source modification.
Strategy: If the end goal is to touch e.g. `stamp.std`, then we first
touch `stamp.std.start_time` before doing anything else.  Then when
the receipe finishes, we touch `stamp.std` using the timestamp from
`stamp.std.start_time` as the reference time, and remove
`stamp.std.start_time`.

Fix #6518.
2015-03-03 15:11:01 +01:00
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
bors 2b01a37ec3 Auto merge of #21959 - dhuseby:bitrig-support, r=brson
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-21 09:20:48 +00: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
Huon Wilson dfc5c0f1e8 Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
One windows bot failed spuriously.
2015-02-18 23:50:21 +11:00
Alex Crichton 25ccf3c0da rollup merge of #22331: steveklabnik/guidelines
Fixes #19315

r? @aturon
2015-02-17 17:26:43 -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
Manish Goregaokar bb0bbf639e Fix removal of complement-bugreport.md 2015-02-17 17:34:00 +05:30
Manish Goregaokar e337a5728a Rollup merge of #22326 - semarie:compat-cp, r=alexcrichton
`cp -a` is a GNU extension. Use an alternate combinaison of POSIX options
(`-PRp`) that do nearly the same.

The difference is `-a` will preserve context, links and xattr attributes,
whereas `-p` not. But as we use it only for copy a file, there is no
difference in the current context.
2015-02-17 06:23:40 +05:30
Manish Goregaokar 6cab5bba75 Rollup merge of #22341 - fhahn:issue-22291-PLEASE-FAIL, r=alexcrichton
This is a patch for #22291.

PLEASE_BENCH=1 adds --bench to the arguments passed to the executable to be tested. At the moment, compiletest does not accept a --bench argument, because it is not needed for any test in src/test/, even the tests in src/test/bench do not use #[bench].

I have updated the makefile to only add the --bench flag for crate tests. I do not think that changing compiletest add --bench to the run arguments of all compile tests makes sense, because it would mess up tests which check command line arguments. Also the bench option can be added as comment in a compile test as well.
2015-02-17 06:23:36 +05:30
Steve Klabnik 96bea5eb72 Import rust-guidlines
at 16fa41b3b0

Fixes #19315
2015-02-16 17:04:16 -05:00
Florian Hahn 6824f1365d Add pfail targets for parse-fail tests 2015-02-16 20:52:39 +01:00
Manish Goregaokar 97503e1c1e Rollup merge of #22256 - brson:installer-next, r=alexcrichton
Highlights:

* Adds an 'uninstall.sh' script to `/usr/local/lib/rustlib/uninstall.sh`, the path to which is printed during installation.
* Components can be deselected during install, like `install.sh --without=rust-docs`.
* Components can be listed with `install.sh --list-components`.
* Vastly reduces spew during install (but supporting a `--verbose` option).

Typicall install run looks like:

```
brian@brianX1:~/dev/multirust⟫ sudo ./install.sh
[sudo] password for brian:
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rust-docs'

    Rust is ready to roll.
```

Needs to be merged right before corresponding PRs to cargo and rust-packaging.

Fixes https://github.com/rust-lang/rust/issues/21117
Fixes https://github.com/rust-lang/rust/issues/20283
2015-02-15 18:42:48 +05:30
Manish Goregaokar ed728ec145 Rollup merge of #22292 - brson:alpha2, r=alexcrichton 2015-02-15 18:42:47 +05:30
Manish Goregaokar 6ce265ede7 Rollup merge of #22308 - steveklabnik:gh19278, r=brson
Fixes #19278
2015-02-15 18:42:45 +05:30
Manish Goregaokar 63091efa3b Rollup merge of #22201 - brson:version, r=nick29581
rustc --version says

```
rustc 1.0.0-dev (d0e82a68a 2015-02-05 14:38:56 -0800) (built 2015-02-11)
```
2015-02-15 18:22:31 +05:30
Florian Hahn ff1181da15 Only set --bench for crate tests when PLEASE_BENCH is set
closes #22291
2015-02-14 23:10:56 +01:00
Sébastien Marie 1c935f197a docs.mk: use posix arguments for cp
`cp -a` is a GNU extension. Use an alternate combinaison of POSIX options
(`-PRp`) that do nearly the same.

The difference is `-a` will preserve context, links and xattr attributes,
whereas `-p` not. But as we use it only for copy a file, there is no
difference in the current context.
2015-02-14 14:10:50 +01:00
Steve Klabnik f64d91211f Generate grammar.html and link to it from the reference.
Fixes #19278
2015-02-13 18:00:00 -05:00
Brian Anderson effad62bc5 Add the build date to the reported version. #21957
rustc --version says

```
rustc 1.0.0-dev (d0e82a68a 2015-02-05) (built 2015-02-11)
```
2015-02-13 14:30:04 -08:00
Brian Anderson be97aab5d3 Update version number for 1.0.0-alpha.2 2015-02-13 11:26:24 -08:00
Brian Anderson be440bc8a6 Upgrade rust-installer 2015-02-12 20:36:17 -08:00
Dave Huseby 2ece7a6831 PR review fixes 2015-02-11 14:49:10 -08:00
Dave Huseby cd8f31759f bitrig integration 2015-02-11 14:49:06 -08:00
Tim Cuthbertson 2a367b9330 docs: disable PDF docs when latex _isn't_ present 2015-02-11 17:16:37 +11: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
bors 00df3251f6 Auto merge of #21992 - steveklabnik:gh17220, r=alexcrichton
None of the others work, so let's remove them.

Fixes #17220.

r? @brson
2015-02-08 23:24:33 +00: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
Steve Klabnik 7d4f068919 Only accept xelatex for building PDF docs
None of the others work, so let's remove them.

Fixes #17220.
2015-02-05 23:21:12 -05:00
Brian Anderson 1364919b6c mk: Print test summary after tidy when running 'make check' 2015-02-05 14:37:17 -08:00
Brian Anderson 4368f6161c mk: Add version number to output. Useful for logs 2015-02-05 14:37:16 -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
Sébastien Marie fcb30a0b67 openbsd support 2015-02-01 14:41:38 +01:00
Brian Anderson d179ba3b8e Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	src/libcore/cmp.rs
	src/libcore/fmt/mod.rs
	src/libcore/iter.rs
	src/libcore/marker.rs
	src/libcore/num/f32.rs
	src/libcore/num/f64.rs
	src/libcore/result.rs
	src/libcore/str/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/lint/context.rs
	src/libstd/sync/mpsc/mod.rs
	src/libstd/sync/poison.rs
2015-01-25 22:14:06 -08:00
bors 102ab57d80 Auto merge of #21582 - FlaPer87:rollup, r=brson
- Successful merges: #21108, #21445, #21498, #21504, #21532, #21535, #21539, #21540, #21541, #21550, #21560, #21573, #21579
- Failed merges:
2015-01-25 13:33:18 +00: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
bors 4e4e8cff16 Auto merge of #21452 - bleibig:bison-grammar, r=nikomatsakis
This adds a new lexer/parser combo for the entire Rust language can be generated with with flex and bison, taken from my project at https://github.com/bleibig/rust-grammar. There is also a testing script that runs the generated parser with all *.rs files in the repository (except for tests in compile-fail or ones that marked as "ignore-test" or "ignore-lexer-test"). If you have flex and bison installed, you can run these tests using the new "check-grammar" make target.

This does not depend on or interact with the existing testing code in the grammar, which only provides and tests a lexer specification.

OS X users should take note that the version of bison that comes with the Xcode toolchain (2.3) is too old to work with this grammar, they need to download and install version 3.0 or later.

The parser builds up an S-expression-based AST, which can be displayed by giving the "-v" argument to parser-lalr (normally it only gives output on error). It is only a rough approximation of what is parsed and doesn't capture every detail and nuance of the program.

Hopefully this should be sufficient for issue #2234, or at least a good starting point.
2015-01-24 22:14:14 +00:00
Flavio Percoco Premoli 8d40f0f3b5 Rollup merge of #21579 - brson:beta, r=alexcrichton 2015-01-24 10:42:42 +01:00
Brian Anderson 2595780e26 Fix beta naming 2015-01-23 21:13:35 -08:00
Alex Crichton 6c29708bf9 regex: Remove in-tree version
The regex library was largely used for non-critical aspects of the compiler and
various external tooling. The library at this point is duplicated with its
out-of-tree counterpart and as such imposes a bit of a maintenance overhead as
well as compile time hit for the compiler itself.

The last major user of the regex library is the libtest library, using regexes
for filters when running tests. This removal means that the filtering has gone
back to substring matching rather than using regexes.
2015-01-23 21:04:10 -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 a6780d8c6b rollup merge of #21414: ejjeong/aarch64-linux-android
Initial support for aarch64-linux-android (#18920)
- Add new configuration files
- Modify some options to compile & link succesfully.
  (PIE, disable tls on jemalloc, modify some external function linkage, ..)
- To build, refer to https://github.com/rust-lang/rust/wiki/Doc-building-for-android.
   (tested with platform=21 and toolchain=aarch64-linux-android-4.9)
2015-01-21 09:15:59 -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
bors 710dcdc2eb Auto merge of #21065 - ColonelJ:master, r=brson
Removed use of unused LDPATH variable on Windows as is done for other platforms, and added GCC flag to ensure MINGW's ANSI compatible STDIO functions are used wherever available (required by jemalloc).

Without these changes it ends up setting the PATH twice, and the second time the PATH begins with `:` which is invalid.  Also the regular msvcrt printf-like functions would be used which don't understand stuff like %hhd and %z which jemalloc uses.

This change ought not to make any difference to the output but it fixes the build process for me since at least my build environment couldn't handle that broken path caused by LDPATH being empty.
2015-01-21 03:54:21 +00:00
Brian Leibig f39297f991 Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -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
Eunji Jeong 940080501b Initial support for aarch64-linux-android 2015-01-20 17:43:15 +09:00
bors 3bf41dafcf Auto merge of #21304 - lifthrasiir:htmldocck, r=alexcrichton
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-20 06:45:02 +00: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
Brian Anderson 056f8f0251 mk: Don't set RUSTC_BOOTSTRAP_KEY on -dev and -nightly. Not needed 2015-01-17 16:37:34 -08:00
Brian Anderson fa1d63acd3 mk: Revert hack to pull the bootstrap key from the snapshot bins 2015-01-17 16:37:34 -08:00
Eduard Burtescu 89b80faa8e Register new snapshots. 2015-01-17 16:37:34 -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 34fa70fba5 std: Move the bitflags! macro to a gated crate
In accordance with [collections reform part 2][rfc] this macro has been moved to
an external [bitflags crate][crate] which is [available though
crates.io][cratesio]. Inside the standard distribution the macro has been moved
to a crate called `rustc_bitflags` for current users to continue using.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
[crate]: https://github.com/rust-lang/bitflags
[cratesio]: http://crates.io/crates/bitflags

The major user of `bitflags!` in terms of a public-facing possibly-stable API
today is the `FilePermissions` structure inside of `std::io`. This user,
however, will likely no longer use `bitflags!` after I/O reform has landed. To
prevent breaking APIs today, this structure remains as-is.

Current users of the `bitflags!` macro should add this to their `Cargo.toml`:

    bitflags = "0.1"

and this to their crate root:

    #[macro_use] extern crate bitflags;

Due to the removal of a public macro, this is a:

[breaking-change]
2015-01-17 10:51:07 -05:00
Alex Crichton a9decbdc44 rustc: Move the privacy pass to its own crate 2015-01-16 08:38:24 -08:00
Alex Crichton 7101ae4686 rollup merge of #21151: brson/beta 2015-01-15 14:11:56 -08:00
Alex Crichton 73149be578 rollup merge of #20985: vhbit/ios-install
It was broken as tried to copy dylibs which are actually never been
built for iOS

Fixes #20358
2015-01-15 14:11:29 -08:00
bors 0c96037ec1 auto merge of #20980 : richo/rust/final-power, r=alexcrichton
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it.

This gets you as far as being able to target powerpc with, eg:

    LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs

Would really love to get this out before 1.0. r? @alexcrichton
2015-01-15 05:12:30 +00:00
Brian Anderson 9b10e9ac32 mk: The beta channel produces things called 'beta' 2015-01-14 10:32:42 -08:00
KernelJ f071f3b185 Fixes to cfg .mk files for Windows: removed use of unused LDPATH variable on Windows as is done for other platforms, and added GCC flag to ensure MINGW's ANSI compatible STDIO functions are used wherever available (required by jemalloc). 2015-01-12 23:26:22 +00:00
Valerii Hiora 11737a3e1d iOS: fixed install phase
It was broken as tried to copy dylibs which are actually never been
built for iOS
2015-01-12 10:09:47 +02:00
Richo Healey 0e0af8ea88 powerpc: Use toolchain assembler on power 2015-01-11 21:14:30 -08:00
Richo Healey a36a8924b4 powerpc: Build llvm for powerpc 2015-01-11 21:14:30 -08:00
Richo Healey f512dce713 powerpc: Add platform configuration 2015-01-11 21:14:30 -08:00
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