Commit Graph

1876 Commits

Author SHA1 Message Date
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
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
bors 4bd302ee9f Auto merge of #29794 - semarie:openbsd-stdcpp-path, r=alexcrichton
under openbsd, the library path of libstdc++ need to be explicit (due
to the fact the default linker `cc` is gcc-4.2, and not gcc-4.9).

but when a recent LLVM is installed, rustc compilation pikes the bad
LLVM version (which live in /usr/local/lib, which is same directory of
libestdc++.so for gcc-4.9).

this patch move the libstdc++ path from RUST_FLAGS_<target> to special
variable, and use it *after* LLVM_LIBDIR_RUSTFLAGS_<target> in
arguments.

r? @alexcrichton
2015-11-17 02:21:20 +00:00
William Throwe ea798b9e25 Fix --libdir installs
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-16 18:55:07 -05:00
Doug Goldstein 19bd051c86 mk/platform: support i486 and i586 target CHOST
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-16 17:07:45 -06:00
Steve Klabnik f0b719d41e Rollup merge of #29549 - brson:docidx, r=steveklabnik
I noticed the nomicon was not listed!

I also removed links to racer and rustfmt since they were not *doc-specific* links, just links to tools, as well as pointed the cargo link directly at the docs.

Removed all the community stuff. There are lots of other places to find this now, including the website.

With pending website changes this page will continue to be pared back, reflecting only what's in-tree, not general Rust docs.

r? @steveklabnik
2015-11-16 16:22:47 -05:00
bors af5d9d65e7 Auto merge of #29845 - wthrowe:libdir, r=alexcrichton
This should get `--libdir` working as well as it was a couple of weeks ago.  (That is, it still rewrites paths incorrectly but it no longer fails during `make install`.)

Fixes gentoo/gentoo-rust#28 and gentoo/gentoo-rust#29.
2015-11-16 07:34:05 +00:00
William Throwe 2b98d4fa55 Prepare to the correct directory with --libdir
This is to handle the case where CFG_LIBDIR is not a direct child of
CFG_PREFIX (in other words, where CFG_LIBDIR_RELATIVE has more than
one component).
2015-11-15 21:15:56 -05:00
William Throwe 8d105dd852 Remove extra eval call in snap.mk 2015-11-13 15:15:51 -05:00
William Throwe a0e10b249e Clean up some "suspicious" whitespace in target.mk
Emacs warns that makefile lines that start with spaces followed by
tabs are "suspicious".  These were harmless since they were
continuation lines, but getting rid of the warning is nice and this
version looks better.
2015-11-13 15:15:51 -05:00
William Throwe 876c33051a Escape some variables in llvm.mk
The important one is $(MAKE).  make handles recipes containing the
literal string "$(MAKE)" specially, so it is important to make sure it
isn't evaluated until recipe invocation time.
2015-11-13 15:15:51 -05:00
Kevin Butler 8e23e2fbcb libtest: deny warnings in doctests 2015-11-12 05:17:07 +00:00
Kevin Butler c0fc402ab6 libterm: deny warnings in doctests 2015-11-12 05:17:02 +00:00
Kevin Butler d64e551248 libsyntax: deny warnings in doctests 2015-11-12 05:16:57 +00:00
Kevin Butler a17f81b4b7 libserialize: deny warnings in doctests 2015-11-12 05:16:53 +00:00
Kevin Butler a715dd52e7 librbml: deny warnings in doctests 2015-11-12 05:16:43 +00:00
Kevin Butler 86c55e7d99 librand: deny warnings in doctests 2015-11-12 05:16:38 +00:00
Kevin Butler d28d000ef9 liblog: deny warnings in doctests 2015-11-12 05:16:34 +00:00
Kevin Butler ac36e10e2f libgraphviz: deny warnings in doctests 2015-11-12 05:16:29 +00:00