Commit Graph

1952 Commits

Author SHA1 Message Date
bors 998a6720b6 Auto merge of #32061 - infinity0:master, r=alexcrichton
Adding -Wno-error is more reliable and simple than trying to modify existing
flags. We've been using this in Debian already for the past few releases.
Making this change also encourages future maintainers towards "best practises".
Also take the opportunity to use the same method at all places in the file.
2016-03-07 00:30:09 +00:00
Angus Lees 7fdb9fd941 More reliable and consistent method of cancelling -Werror*
Adding -Wno-error is more reliable and simple than trying to modify existing
flags. We've been using this in Debian already for the past few releases.
Making this change also encourages future maintainers towards "best practises".
Also take the opportunity to use the same method at all places in the file.
2016-03-05 14:45:25 +01:00
Alex Crichton 4fbc080033 std: Update jemalloc again to the 4.* track 2016-03-04 09:49:39 -08:00
Brian Anderson 7bf4d9c951 Bump to 1.9 2016-03-01 18:34:26 +00:00
bors f59fd46425 Auto merge of #31846 - alexcrichton:better-disable-jemallc, r=brson
The `--disable-jemalloc` configure option has a failure mode where it will
create a distribution that is not compatible with other compilers. For example
the nightly for Linux will assume that it will link to jemalloc by default as
an allocator for executable crates. If, however, a standard library is used
which was built via `./configure --disable-jemalloc` then this will fail
because the jemalloc crate wasn't built.

While this seems somewhat reasonable as a niche situation, the same mechanism is
used for disabling jemalloc for platforms that just don't support it. For
example if the rumprun target is compiled then the sibiling Linux target *also*
doesn't have jemalloc. This is currently a problem for our cross-build nightlies
which build many targets. If rumprun is also built, it will disable jemalloc for
all targets, which isn't desired.

This commit moves the platform-specific disabling of jemalloc as hardcoded logic
into the makefiles that is scoped per-platform. This way when configuring
multiple targets **without the `--disable-jemalloc` option specified** all
targets will get jemalloc as they should.
2016-02-26 13:38:46 +00:00
Alex Crichton b980f22877 mk: Move disable-jemalloc logic into makefiles
The `--disable-jemalloc` configure option has a failure mode where it will
create a distribution that is not compatible with other compilers. For example
the nightly for Linux will assume that it will link to jemalloc by default as
an allocator for executable crates. If, however, a standard library is used
which was built via `./configure --disable-jemalloc` then this will fail
because the jemalloc crate wasn't built.

While this seems somewhat reasonable as a niche situation, the same mechanism is
used for disabling jemalloc for platforms that just don't support it. For
example if the rumprun target is compiled then the sibiling Linux target *also*
doesn't have jemalloc. This is currently a problem for our cross-build nightlies
which build many targets. If rumprun is also built, it will disable jemalloc for
all targets, which isn't desired.

This commit moves the platform-specific disabling of jemalloc as hardcoded logic
into the makefiles that is scoped per-platform. This way when configuring
multiple targets **without the `--disable-jemalloc` option specified** all
targets will get jemalloc as they should.
2016-02-25 21:05:59 -08:00
bors 15e9a95a4b Auto merge of #31749 - nikomatsakis:compiletest-subdir, r=alexcrichton
You can now group tests into directories like `run-pass/borrowck` or `compile-fail/borrowck`. By default, all `.rs` files within any directory are considered tests: to ignore some directory, create a placeholder file called `compiletest-ignore-dir` (I had to do this for several existing directories).

r? @alexcrichton
cc @brson
2016-02-26 00:53:38 +00:00
Manish Goregaokar db86810a60 Rollup merge of #31800 - alexcrichton:armv6-plz, r=brson
Right now the compiler's we're using actually default to armv7/thumb2 I believe,
so this should help push them back to what the arm-unknown-linux-* targets are
for. This at least matches that clang does for the `arm-unknown-linux-gnueabihf`
target which is to map it to an armv6 architecture.

Closes #31787
2016-02-25 11:41:01 +05:30
Niko Matsakis c1ec32d4f7 Recurse to find test files in any subdirectory of the base path. If a
subdirectory contains `compiletest-ignore-dir`, then ignore it.
2016-02-24 18:40:39 -05:00
petevine 8ddd86a2ab Eradicate last vestiges of armv6 2016-02-22 08:25:29 +01:00
Alex Crichton 8bfb93c275 mk: Add missing rustbuild dirs to `dist`
Forgot to add a few directories to `make dist` so `--enable-rustbuild` can
continue to work.

Closes #31801
2016-02-20 18:34:07 -08:00
Alex Crichton d4fda669de mk: Specify armv6 for gcc on arm-unknown-linux-*
Right now the compiler's we're using actually default to armv7/thumb2 I believe,
so this should help push them back to what the arm-unknown-linux-* targets are
for. This at least matches that clang does for the `arm-unknown-linux-gnueabihf`
target which is to map it to an armv6 architecture.

Closes #31787
2016-02-20 18:21:26 -08:00
bors 8018280d6f Auto merge of #31672 - semarie:rmake-cxx, r=alexcrichton
use CXX value found at configure time inside run-make tests.

it permits OpenBSD to pass llvm-module-pass test (which use CXX
variable).

r? @alexcrichton
2016-02-16 11:10:30 +00:00
Sébastien Marie 263de3d0e7 pass CXX to run-make
use CXX value found at configure time inside run-make tests.

it permits OpenBSD to pass llvm-module-pass test (which use CXX
variable).
2016-02-16 06:30:30 +01:00
Dirk Gadsden 2766e254b1 Rename `error-index-generator` to `error_index_generator`
This is because the tool compiler passes the name of the tool
as a command line `--cfg`. The improved session config parser
is stricter and no longer permits invalid meta items (such as
"error-index-generator").
2016-02-14 22:29:45 -08:00
Alex Crichton e3b414d861 std: Stop prefixing jemalloc symbols
Now that we properly only link in jemalloc when building executables, we have
far less to worry about in terms of polluting the global namespace with the
`free` and `malloc` symbols on Linux. This commit will primarily allow LLVM to
use jemalloc so the compiler will only be using one allocator overall.

Locally this took compile time for libsyntax from 95 seconds to 89 (a 6%
improvement).
2016-02-14 11:50:40 -08:00
bors 86e6e3235e Auto merge of #31391 - frewsxcv:test, r=alexcrichton
Part of #31185
2016-02-14 08:25:39 +00:00
Corey Farwell e5e2cdb9e3 Add LLVM ModulePass regression test using run-make.
Part of #31185
2016-02-13 22:04:51 -05:00
petevine d3ca33fc6e Add a new i586 Linux target 2016-02-13 17:03:00 +01:00
bors ce4b75f256 Auto merge of #30726 - GuillaumeGomez:compile-fail, r=brson
r? @brson
cc @alexcrichton

I still need to add error code explanation test with this, but I can't figure out a way to generate the `.md` files in order to test example source codes.

Will fix #27328.
2016-02-12 18:25:08 +00:00
Alex Crichton 55dd595c08 rustc_back: Fix disabling jemalloc
When building with Cargo we need to detect `feature = "jemalloc"` to enable
jemalloc, so propagate this same change to the build system to pass the right
`--cfg` argument.
2016-02-11 11:12:33 -08:00
Alex Crichton 34f7364332 rustc_llvm: Tweak how initialization is performed
Refactor a bit to have less repetition and #[cfg] and try to bury it all inside
of a macro.
2016-02-11 11:12:33 -08:00
Oliver Schneider 4b067183ba Allow registering MIR-passes through compiler plugins 2016-02-09 16:53:43 +01:00
Guillaume Gomez ed6b575648 Update Makefile 2016-02-09 05:22:24 +01:00
Brian Anderson bd3fe498e5 Add support for i686-unknown-linux-musl 2016-02-06 20:56:31 +00:00
Brian Anderson d6c0d859f6 Add the asmjs-unknown-emscripten triple. Add cfgs to libs.
Backtraces, and the compilation of libbacktrace for asmjs, are disabled.

This port doesn't use jemalloc so, like pnacl, it disables jemalloc *for all targets*
in the configure file.

It disables stack protection.
2016-02-06 20:56:14 +00:00
bors 06fac8298f Auto merge of #31388 - gmbonnet:compiler-rt-werror, r=alexcrichton
Without this patch, `compiler-rt` fails to build when the `CFLAGS` environment variable contains a `-Werror=*` flag (for example `-Werror=format-security`).

The build system was removing only the `-Werror` part from the flag, thus passing an unrecognized `=*` (for example `=format-security`) argument to gcc.
2016-02-05 08:54:46 +00:00
bors e3bcddb44b Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichton
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846.

Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138

Here's a snapshot required to build a stage0 compiler:
https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz
It passes all checks from `make check`.

There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated.

Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409

Thanks!

r? @brson
2016-02-03 22:40:32 +00:00
Guillaume Bonnet e9dfc94d26 compiler-rt: Handle -Werror=* arguments in CFLAGS 2016-02-03 16:17:32 +01:00
Alex Crichton 178d4b0fd3 Revert "mk: fix some undefined variable warnings"
This reverts commit d03712977d.
2016-02-01 23:27:04 -08:00
bors 7cae6b59b4 Auto merge of #30367 - tamird:fix-makefile-bugs, r=alexcrichton
Some of this is scary stuff. Probably time to lint against this.

Found with `make --warn-undefined-variables`.

r? @alexcrichton
2016-02-01 18:27:54 +00:00
bors 91e804409b Auto merge of #31303 - alexcrichton:mips-warnings, r=aturon
Currently any compilation to MIPS spits out the warning:

    'generic' is not a recognized processor for this target (ignoring processor)

Doesn't make for a great user experience! We don't encounter this in the normal
bootstrap because the cpu/feature set are set by the makefiles. Instead let's
just propagate these to the defaults for the entire target all the time (still
overridable from the command line) and prevent warnings from being emitted by
default.
2016-02-01 12:24:01 +00:00
Tamir Duberstein d03712977d mk: fix some undefined variable warnings
Some of this is scary stuff. Probably time to lint against this.

Found with `make --warn-undefined-variables`.
2016-02-01 05:21:06 -05:00
petevine 2efd024ad3 Fix the armv7 linux target 2016-01-31 22:26:34 +01:00
Nikita Baksalyar f189d7a693
Add Illumos support 2016-01-31 18:57:26 +03:00
bors 9041b93058 Auto merge of #31298 - japaric:mips-musl, r=alexcrichton
This target covers MIPS devices that run the trunk version of OpenWRT.

The x86_64-unknown-linux-musl target always links statically to C libraries. For
the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of
other targets do) to keep binary size down.

As for the C compiler flags used in the build system, we use the same flags used
for the mips(el)-unknown-linux-gnu target.

r? @alexcrichton
2016-01-31 12:27:06 +00:00
Jorge Aparicio 64ac041b1f rustc: set MIPS cpu/features in the compiler
cf #31303
2016-01-30 14:44:40 -05:00
Jorge Aparicio 146dfce803 revert changes used for local testing 2016-01-30 14:44:38 -05:00
bors 9bda7ea81d Auto merge of #31274 - brson:nobench, r=nikomatsakis
I don't believe these test cases have served any purpose in years.

The shootout benchmarks are now upstreamed. A new benchmark suite
should rather be maintained out of tree.

r? @nikomatsakis
2016-01-30 14:50:44 +00:00
Manish Goregaokar 5ff52dbf2f Rollup merge of #31290 - alexcrichton:fix-powerpc64, r=brson
We forgot to pass down the `-m64` flag to gcc, so we were actually compiling
powerpc code which would then later fail to link!
2016-01-30 17:57:16 +05:30
Alex Crichton 0316013b49 rustc: Set MIPS cpu/features in the compiler
Currently any compilation to MIPS spits out the warning:

    'generic' is not a recognized processor for this target (ignoring processor)

Doesn't make for a great user experience! We don't encounter this in the normal
bootstrap because the cpu/feature set are set by the makefiles. Instead let's
just propagate these to the defaults for the entire target all the time (still
overridable from the command line) and prevent warnings from being emitted by
default.
2016-01-29 23:44:46 -08:00
bors 303892ee15 Auto merge of #30448 - alexcrichton:llvmup, r=nikomatsakis
These commits perform a few high-level changes with the goal of enabling i686 MSVC unwinding:

* LLVM is upgraded to pick up the new exception handling instructions and intrinsics for MSVC. This puts us somewhere along the 3.8 branch, but we should still be compatible with LLVM 3.7 for non-MSVC targets.
* All unwinding for MSVC targets (both 32 and 64-bit) are implemented in terms of this new LLVM support. I would like to also extend this to Windows GNU targets to drop the runtime dependencies we have on MinGW, but I'd like to land this first.
* Some tests were fixed up for i686 MSVC here and there where necessary. The full test suite should be passing now for that target.

In terms of landing this I plan to have this go through first, then verify that i686 MSVC works, then I'll enable `make check` on the bots for that target instead of just `make` as-is today.

Closes #25869
2016-01-30 00:25:44 +00:00
Alex Crichton 58f1b9c7fc Get tests working on MSVC 32-bit 2016-01-29 16:25:21 -08:00
Jorge Aparicio 7b026f0355 add support for mips(el)-unknown-linux-musl
This target covers MIPS devices that run the trunk version of OpenWRT.

The x86_64-unknown-linux-musl target always links statically to C libraries. For
the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of
other targets do) to keep binary size down.

As for the C compiler flags used in the build system, we use the same flags used
for the mips(el)-unknown-linux-gnu target.
2016-01-29 18:46:25 -05:00
Brian Anderson 005c9624bb Remove src/test/bench
I don't believe these test cases have served any purpose in years.

The shootout benchmarks are now upstreamed. A new benchmark suite
should rather be maintained out of tree.
2016-01-29 21:54:30 +00:00
Alex Crichton ea31ff20f0 mk: Fix cross-compiling to armv7-unknown-linux-gnu
The cross prefix was not likely the actual compiler that needed to be used, but
rather the standard `arm-linux-gnueabihf-gcc` compiler can just be used with
`-march=armv7`.
2016-01-29 12:36:45 -08:00
Alex Crichton 7e1acc57d8 mk: Fix compiling jemalloc for powerpc64
We forgot to pass down the `-m64` flag to gcc, so we were actually compiling
powerpc code which would then later fail to link!
2016-01-29 12:23:17 -08:00
Manish Goregaokar 7a0e490bdd Rollup merge of #31276 - alexcrichton:fix-powerpc64-cross-prefix, r=brson
Looks like the way to create these executables is to use the standard
`powerpc-linux-gnu-gcc` compiler but with the `-m64` option.
2016-01-29 20:19:39 +05:30
Manish Goregaokar cbfc5e3704 Rollup merge of #31252 - alexcrichton:ios-old-mac, r=brson
Unfortunately older clang compilers don't support this argument, so the
bootstrap will fail. We don't actually really need to optimized the C code we
compile, however, as currently we're just compiling jemalloc and not much else.
2016-01-29 20:19:38 +05:30
bors 7bd87c1f1b Auto merge of #30948 - fabricedesre:rpi2, r=alexcrichton
This adds support for the armv7 crosstool-ng toolchain for the Raspberry Pi 2.

Getting the toolchain ready:
Checkout crosstool-ng from https://github.com/crosstool-ng/crosstool-ng
Build crosstool-ng
Configure the rpi2 target with |ct-ng armv7-rpi2-linux-gnueabihf|
Build the toolchain with |ct-build| and add the path to $toolchain_install_dir/bin to your $PATH

Then, on the rust side:
configure --target=armv7-rpi2-linux-gnueabihf && make && make install

To cross compile for the rpi2,
add $rust_install_path/lib to your $LD_LIBRARY_PATH, then use
rustc --target=armv7-rpi2-linux-gnueabihf -C linker=armv7-rpi2-linux-gnueabihf-g++ hello.rs
2016-01-29 06:41:22 +00:00