Commit graph

1893 commits

Author SHA1 Message Date
bors 83c3b7f5a4 Auto merge of #30930 - oli-obk:fix/30887, r=arielb1
this makes sure the checks run before typeck (which might use the constant or const
function to calculate an array length) and gives prettier error messages in case of for
loops and such (since they aren't expanded yet).

fixes #30887

r? @pnkfelix
2016-01-16 08:20:31 +00:00
Oliver Schneider 1471d932a9 move const block checks before lowering step
this makes sure the checks run before typeck (which might use the constant or const
function to calculate an array length) and gives prettier error messages in case of for
loops and such (since they aren't expanded yet).
2016-01-15 13:16:54 +01:00
Manish Goregaokar 7208d25003 Rollup merge of #30776 - antonblanchard:powerpc64_merge, r=alexcrichton
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
2016-01-15 17:28:28 +05:30
Manish Goregaokar 74458cf42a Rollup merge of #30874 - dhuseby:fixing_bitrig_tests, r=alexcrichton
fixes the failing bitrig unit tests.
2016-01-14 19:12:28 +05:30
Manish Goregaokar 1246f43bf9 Rollup merge of #30863 - jseyfried:no_rc, r=eddyb
Use arena allocation instead of reference counting for `Module`s to fix memory leaks from `Rc` cycles.

A module references its module children and its import resolutions, and an import resolution references the module defining the imported name, so there is a cycle whenever a module imports something from an ancestor module.

For example,
```rust
mod foo { // `foo` references `bar`.
    fn baz() {}
    mod bar { // `bar` references the import.
        use foo::baz; // The import references `foo`.
    }
}
```
2016-01-14 11:04:43 +05:30
Dave Huseby a933526fc4 Fixes #30873 2016-01-13 11:25:01 -08:00
bors b0eec55c3f Auto merge of #30794 - joerg-krause:fix-arm-unknown-linux-gnueabi-float-abi, r=alexcrichton
gnueabi indicates soft whereas gnueabihf indicates hard floating-point ABI.
2016-01-13 16:57:01 +00:00
Anton Blanchard b372910476 Add powerpc64 and powerpc64le support
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
2016-01-13 01:39:00 +00:00
Jeffrey Seyfried a8514d3ecc resolve: use arena allocation instead of reference counting for Modules to fix memory leaks from Rc cycles 2016-01-13 00:54:16 +00:00
bors 3246eaec90 Auto merge of #30678 - Amanieu:no_elf_tls, r=alexcrichton
I also re-enabled the use of `#[thread_local]` on AArch64. It was originally disabled in the PR that introduced AArch64 (#19790), but the reasons for this were not explained. `#[thread_local]` seems to work fine in my tests on AArch64, so I don't think this should be an issue.

cc @alexcrichton @akiss77
2016-01-12 08:30:56 +00:00
bors dedaebd5a1 Auto merge of #30599 - brson:extra, r=alexcrichton
This mixes in additional information into the hash that is
passed to -C extra-filename. It can be used to further distinguish
the standard libraries if they must be installed next to each
other.

Closes #29559

Frankly, I'm not sure if this solves a real problem. It's meant to help with side-by-side and overlapping installations where there are two sets of libs in /usr, but there are other potential issues there as well, including that some of our artifacts don't use this extra-filename munging, and it's not something our installers can support at all.

cc @jauhien Do you still think this helps the Gentoo case?
2016-01-12 03:00:00 +00:00
Amanieu d'Antras e304fb43a3 Replace no_elf_tls with target_thread_local 2016-01-11 10:38:36 +00:00
Jörg Krause 035a0933f8 Fix arm-unknown-linux-gnueabi floating-point ABI
gnueabi indicates soft whereas gnueabihf indicates hard floating-point ABI.
2016-01-09 14:25:02 +01:00
Felix S. Klock II b043ded802 finish enabling -C rpath by default in rustc. See #30353. 2016-01-06 16:24:18 +01:00
Simonas Kazlauskas ad3371aedb Rollup merge of #30365 - tamird:update-valgrind, r=pnkfelix
Since `darwin` is really `apple-darwin`, the valgrind-rpass tests were not actually being run with valgrind on mac before. Also, the `HOST` check was completely wrong.

r? @alexcrichton
2015-12-31 18:52:19 +02:00
Brian Anderson ce81f24340 configure: Add --extra-filename flag
This mixes in additional information into the hash that is
passed to -C extra-filename. It can be used to further distinguish
the standard libraries if they must be installed next to each
other.

Closes #29559
2015-12-29 00:18:15 +00:00
bors 5178449f1c Auto merge of #30175 - alexcrichton:less-c-code, r=brson
All these definitions can now be written in Rust, so do so!
2015-12-22 07:23:16 +00:00
Alex Crichton 2f42ac438e std: Remove rust_builtin C support library
All these definitions can now be written in Rust, so do so!
2015-12-21 22:12:48 -08:00
bors 5d4efcb132 Auto merge of #30434 - alexcrichton:update-jemalloc, r=alexcrichton
It's been awhile since we last updated jemalloc, and there's likely some bugs
that have been fixed since the last version we're using, so let's try to update
again.
2015-12-21 23:31:06 +00:00
Alex Crichton 9929c246f1 std: Update jemalloc version
It's been awhile since we last updated jemalloc, and there's likely some bugs
that have been fixed since the last version we're using, so let's try to update
again.
2015-12-21 13:34:48 -08:00
Alex Crichton cd1848a1a6 Register new snapshots
Lots of cruft to remove!
2015-12-21 09:26:21 -08:00
bors 29e60aba7d Auto merge of #30493 - semarie:openbsd-cc, r=alexcrichton
this PR reverts previous ones, that tried to make `cc` to found `estdc++` in `/usr/local/lib`. It causes more trouble than it resolvs things: rustc become unbuildable if another version already exists in `/usr/local` (for example, `libstd-xxxx.so` is found in `/usr/local/lib` and in builddir).

so this PR tries another way to achieve build, but using the good linker for building. By default, rustc use `cc` for linking. But under OpenBSD, `cc` is gcc 4.2.1 from base, whereas we build with gcc 4.9 from ports. By linking using the compiler found at compile-time, we ensure that the compiler will found his own stdc++ library without trouble.

r? @alexcrichton
2015-12-21 04:15:28 +00:00
Sébastien Marie b74359a0a0 openbsd: use specific linker for building
By default, rustc use `cc` as linker. Under OpenBSD, `cc` is gcc version 4.2.1.
So use the compiler found at configure-time for linking: it will be gcc 4.9.

It permits to resolv problem of finding -lestdc++ or -lgcc. For base gcc (4.2), there are in not standard path, whereas for ports gcc (4.9) there are in standard path.
2015-12-20 07:21:36 +01:00
Sébastien Marie e6418964b9 remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGS
it isn't the good way to process, as it makes conflicts when building rustc while another version of rustc in installed system-wide.
2015-12-20 07:21:36 +01:00
bors cef0d0f9a8 Auto merge of #30401 - DiamondLovesYou:pnacl-target, r=alexcrichton
r? @alexcrichton
2015-12-19 21:29:04 +00:00
Richard Diamond 0442be8e1c Add PNaCl target info to the makefile target cfgs and initialize the PNaCl target
machine if available.
2015-12-19 00:26:53 -06:00
Tamir Duberstein 928e3e4e44 mk: actually run valgrind on x86_64-apple-darwin 2015-12-18 06:53:38 -05:00
Alex Crichton 04f9a3f8fe mk: Use the right llvmdeps.rs file for cross build
It looks like #27937 accidentally switched the llvmdeps file from the target to
the host by accident, so be sure to use the right llvmdeps file which is built
for the target when building rustc_llvm
2015-12-16 08:06:27 -08:00
Seo Sanghyeon f9ba107824 Move built-in syntax extensions to a separate crate 2015-12-15 15:04:46 +09:00
bors f150c178ea Auto merge of #27937 - DiamondLovesYou:llvm-root-and-shared, r=alexcrichton
This handles cases when the LLVM used isn't configured will the 'usual' targets. Also, cases where LLVM is shared are also handled (ie with `LD_LIBRARY_PATH` etc).
2015-12-14 19:14:37 +00:00
Richard Diamond 7bd69f2248 Better support for --llvm-root.
This handles cases when the LLVM used isn't configured will the 'usual'
targets. Also, cases where LLVM is shared are also handled (ie with
`LD_LIBRARY_PATH` etc).
2015-12-13 15:05:43 -06:00
Dave Huseby 0c491e86f0 Fixes #30333 by removing the -arch i386 form the right spot 2015-12-11 10:53:04 -08:00
bors 0b49cb1dca Auto merge of #30288 - brson:bump, r=alexcrichton 2015-12-09 21:11:48 +00:00
Brian Anderson c479e4e232 Bump to 1.7 2015-12-09 08:23:35 -08:00
bors eebf6743d8 Auto merge of #30140 - michaelwoerister:tls-encoding, r=nikomatsakis
With this commit, metadata encoding and decoding can make use of thread-local encoding and decoding contexts. These allow implementers of `serialize::Encodable` and `Decodable` to access information and
datastructures that would otherwise not be available to them. For example, we can automatically translate def-id and span information during decoding because the decoding context knows which crate the data is decoded from. Or it allows to make `ty::Ty` decodable because the context has access to the `ty::ctxt` that is needed for creating `ty::Ty` instances.

Some notes:
- `tls::with_encoding_context()` and `tls::with_decoding_context()` (as opposed to their unsafe versions) try to prevent the TLS data getting out-of-sync by making sure that the encoder/decoder passed in is actually the same as the one stored in the context. This should prevent accidentally reading from the wrong decoder.
- There are no real tests in this PR. I had a unit tests for some of the core aspects of the TLS implementation but it was kind of brittle, a lot of code for mocking `ty::ctxt`, `crate_metadata`, etc and did actually test not so much. The code will soon be tested by the first incremental compilation auto-tests that rely on MIR being properly serialized. However, if people think that some tests should be added before this can land, I'll try to provide some that make sense.

r? @nikomatsakis
2015-12-09 15:10:37 +00:00
Michael Woerister f65823e39c Add scoped thread-local encoding and decoding contexts to cstore.
With this commit, metadata encoding and decoding can make use of
thread-local encoding and decoding contexts. These allow implementers
of serialize::Encodable and Decodable to access information and
datastructures that would otherwise not be available to them. For
example, we can automatically translate def-id and span information
during decoding because the decoding context knows which crate the
data is decoded from. Or it allows to make ty::Ty decodable because
the context has access to the ty::ctxt that is needed for creating
ty::Ty instances.
2015-12-09 09:47:32 -05:00
bors 9cadb2955f Auto merge of #30263 - pnkfelix:rsbegin-rsend-are-window-gnu-only, r=alexcrichton
The `rsbegin.o` and `rsend.o` build products should not be generated
on non WinGnu platforms.

This is another path to resolving #30063 for non win-gnu targets.
(And it won't require a snapshot, unlike PR #30208.)

r? @alexcrichton
2015-12-09 09:32:18 +00:00
Felix S. Klock II 31d383fcd2 Remove STARTUP_OBJS from Makefile deps for non win-gnu targets.
The `rsbegin.o` and `rsend.o` build products should not be generated
on non WinGnu platforms.

This is another path to resolving #30063 for non win-gnu targets.
(And it won't require a snapshot, unlike PR #30208.)
2015-12-08 14:56:22 +01:00
Markus Unterwaditzer 9002600486 Fix typo in make var 2015-12-07 00:20:35 +01:00
Alex Crichton 086f02d3d1 mk: Fix make dist
Now that AUTHORS.txt no longer exists we shouldn't try to package it.
2015-12-04 08:55:02 -08:00
Jake Worth 4632101fc2 Fix typo 2015-12-03 18:29:00 -05:00
Brian Anderson f65f438b08 mk: Remove obsolete comment
This dates from the stone-ages. We always configure LLVM with all
supported targets.
2015-12-02 02:13:32 +00:00
Steve Klabnik 1a2d1b8d36 Re-enable testing the book
In #29932, I moved the location of TRPL, but I missed making the changes
in mk/tests.mk. This led to #30088 landing with a broken example.

As such, #30113 will need to land before this.
2015-11-30 14:55:26 -05:00
Ariel Ben-Yehuda 0a8bb4c509 split the metadata code into rustc_metadata
tests & rustdoc still broken
2015-11-26 18:22:40 +02:00
Ariel Ben-Yehuda 1430a35000 move librustc/plugin to librustc_plugin
this is a [breaking-change] to all plugin authors - sorry
2015-11-26 18:22:39 +02:00
Steve Klabnik d0ca581016 Rollup merge of #29397 - dylanmckay:llvmdeps-deps, r=brson
Previously the file was not regenrated upon modification of `src/rustllvm` or others.

Now it will be rebuilt if `src/llvm` or `src/rustllvm` is touched.

Also added *.rs rule to 'clean' rule so that it is removed upon 'make
clean'.

Fixes #28614.
2015-11-24 09:43:46 -05:00
Angus Lees 07b7f2fbc9 Set CFLAGS/LDFLAGS/etc according to Debian policy
Debian wants to build all binaries with particular hardening flags.
The Rust makefiles are inconsistent in which architectures they
correctly include CFLAGS/etc from the enivoronment (see mk/cfg/*).

This patch adds LDFLAGS, and then unconditionally prepends
CFLAGS/LDFLAGS/etc to the build commands.
2015-11-20 12:51:10 -02:00
Steve Klabnik 024aa9a345 src/doc/trpl -> src/doc/book
The book was located under 'src/doc/trpl' because originally, it was
going to be hosted under that URL. Late in the game, before 1.0, we
decided that /book was a better one, so we changed the output, but
not the input. This causes confusion for no good reason. So we'll change
the source directory to look like the output directory, like for every
other thing in src/doc.
2015-11-19 11:30:18 -05:00
bors edcfeb7996 Auto merge of #29878 - wthrowe:libdir2, r=brson
Rather than modifying the installer to disable directory rewriting,
this patch modifies the directory structure passed to the installer so
that the rewriting gives the correct results.  This means that if a
non-standard --libdir is passed to configure then the same --libdir
option (relative to the --prefix) must be passed to the install
script.  In the `make install` case this is handled automatically.
Binary distributions are generally generated using the default
--libdir and then have paths optionally rewritten by the installer,
which should continue to work.

This has the advantage of not complicating the installer interface
intended for end-user use.

Fixes #29561
2015-11-18 21:33:34 +00:00
Manish Goregaokar 3d1f3c9d38 Rollup merge of #29876 - cardoe:i586-build-fix, r=alexcrichton
On distros that use i486 or i586 in their CHOST, Rust will fail to build
because it is not handling i486 or i586 like i686 is handled. This
changes the match to do work for all instances of i?86 instead of just
i686. The Yocto Project still uses i586 as a target.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2015-11-17 15:12:15 +05:30