Commit Graph

1448 Commits

Author SHA1 Message Date
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
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