Commit Graph

517 Commits

Author SHA1 Message Date
bors
69b2fce7bb Auto merge of #29858 - fhahn:abort-if-path-has-spaces, r=brson
The Rust build scripts do work if the source directory contains spaces. I tried to make it work with spaces. I managed to get the Rust's and LLVM's configure scripts to work with spaces in the path, but I could not figure out how to get the Rust makefiles working.

So for now, this PR updates Rust's `configure` to abort if the source path contains spaces. I also added a note about spaces in the source path to the README.

I think this should close #18477 for now.
2015-12-01 21:38:20 +00: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
Florian Hahn
9612c9ab20 Abort configure if source path contains spaces, closes #18477 2015-11-16 23:57:21 +01:00
bors
cc403b6c33 Auto merge of #29478 - angelsl:msvc2, r=alexcrichton
r? @alexcrichton
2015-11-04 06:07:24 +00:00
angelsl
9fe4e962e1 Build compiler-rt/builtins with MSVC 2015-11-04 11:43:41 +08:00
Vadim Chugunov
4e0c6db67f Windows: Move target libraries to $rustroot/lib/rustlib/... - for symmetry with all other platforms. 2015-10-31 23:29:39 -07:00
Alex Crichton
f351b69edd Revert "Build compiler-rt/builtins with MSVC"
This reverts commit b09e8f51a2.
2015-10-30 10:36:38 -07:00
angelsl
b09e8f51a2 Build compiler-rt/builtins with MSVC 2015-10-28 15:23:20 +08:00
bors
6843ea4a46 Auto merge of #28717 - nagisa:optional-no-landing-pads, r=alexcrichton
Part of #28710

Landing pads during stage0 are now enabled by defaullt. Since this has its downsides and upsides either way, I made it possible to change the option through configure.
2015-10-05 21:47:47 +00:00
Robin Kruppe
4df35ba454 Stop probing for pandoc and xelatex, they are not used any more. 2015-10-01 14:34:31 +02:00
Simonas Kazlauskas
cefadf05f9 Enable and make stage0 landing pads optional 2015-09-29 20:18:03 +03:00
Sebastian Wicki
c099cfab06 Add support for the rumprun unikernel
For most parts, rumprun currently looks like NetBSD, as they share the same
libc and drivers. However, being a unikernel, rumprun does not support
process management, signals or virtual memory, so related functions
might fail at runtime. Stack guards are disabled exactly for this reason.

Code for rumprun is always cross-compiled, it uses always static
linking and needs a custom linker.
2015-09-26 14:10:14 +02:00
Sébastien Marie
913fe6dbe9 add support for non-standard name of stdc++ library
it makes rustc compatible with gcc installation that are using
`--program-transform-name' configure flag (on OpenBSD for example).

- detects at configure the name of stdc++ library on the system

- use the detected name in llvm makefile (with enable-static-stdcpp),
  and pass it to mklldeps.py

- generate mklldeps.rs using this detected name

note that CFG_STDCPP_NAME is about stdc++ name, not about libc++. If
using libc++, the default name will be `stdc++', but it won't be used
when linking.
2015-09-18 18:03:59 +02:00
bors
d89a10b0a6 Auto merge of #28340 - brson:configure, r=alexcrichton
Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.

r? @alexcrichton
2015-09-12 02:57:01 +00:00
Brian Anderson
2662a72537 configure cleanup on windows
Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.
2015-09-11 14:33:29 -07:00
bors
5c56887903 Auto merge of #28331 - semarie:openbsd-configure-egcc, r=alexcrichton
under OpenBSD, it could be have present multiples versions of gcc compiler:
  - gcc-4.2 (with patchs) : c/c++ compiler present in `/usr/bin`. It is unusable to build recent LLVM (so rustc too).
  - gcc/g++ -4.9 : c/c++ compiler, installed as third-party with "ports" mechanism. The compiler is installed in `/usr/local` as `egcc` (and `eg++`).

this PR adds probing for `egcc` for `CFG_GCC`, if the first probed `gcc` is too old. It will set `CC` and `CXX` too, in order to pass the variables to LLVM configure if builded.

please note this PR is a first step in order to build rustc under OpenBSD with unpatched tree.

r? @alexcrichton

cc @brson @dhuseby
2015-09-10 23:33:31 +00:00
Sébastien Marie
9ac36f4665 disable jemalloc on OpenBSD
depending of the compiler used, jemalloc configure don't detect
correctly some parameters.
2015-09-10 18:52:19 +02:00
Sébastien Marie
90043cbbf0 openbsd: probe CFG_GCC egcc
if default CFG_GCC is too old, probe also egcc (which is gcc from
ports).

set CC/CXX too, in order to pass them to LLVM
2015-09-10 11:59:01 +02:00
Dong Zhou
0ad631cf7c Fix clang too 2015-09-09 11:45:59 -04:00
Dong Zhou
d77a249917 Fix configure for LLVM 3.8 2015-09-09 11:32:05 -04:00
Diggory Blake
f86c853fee Fix escaping in msvc builds 2015-09-04 10:03:56 +01:00
Tim JIANG
a1b2deb33b New cross target: i686-linux-android
- All the libstd tests are now passing in the optimized build against
  a Zenfone2 and the x86 Android simulator.
2015-08-23 15:38:11 +08:00
Marc-Antoine Perennou
c977596992 rustc_back: add configure options for default linker and ar
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2015-08-19 18:06:34 +02:00
Sylvestre Ledru
5bcbc5c735 Bug #27621 - Make sure that LLVM FileCheck is available on the system 2015-08-10 09:53:00 +02:00
Dave Huseby
40eb53c409 recent changes to search for gcc/clang on freebsd and this fixes #14381 2015-07-28 21:23:19 -07:00
bors
aa6efd959e Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.
2015-07-28 17:58:18 +00:00
Mark Buer
33a7e67904 Splits Android NDK path configuration. 2015-07-28 19:21:04 +12:00
bors
8b835572b9 Auto merge of #27250 - alexcrichton:ucrt, r=brson
Visual Studio 2015, recently released, includes the Universal CRT, a different
flavor than was provided before. The binaries and header files for this library
are included in new locations not previously known about by gcc-rs, and this
commit adds support for the necessary probing to find these.

Unfortunately there are no prior examples of this probing to be found in
frameworks like CMake or clang, so this is done is a bit of a sketchy method
today. It assumes that the installation is in a relatively standard format and
then blindly looks for the location of the UCRT. I'd love to switch this over to
using registry keys for probing, but I was currently unable to find such keys.

This should enable the compiler to work outside VS 2015 dev tools prompts.
2015-07-27 23:38:04 +00:00
Steven Stewart-Gallus
f3bfbda665 Standardize on non-zero checks for configure 2015-07-26 14:18:30 -07:00
Alex Crichton
95ec4be02b configure: Add support for VS 2015
Adds support to the configure script for detecting Visual Studio 2015 being
installed and builds LLVM/uses cl with that compiler. The compiler will
automatically use this MSVC linker anyway because it's the highest version.
2015-07-23 19:38:00 -07:00
Felix S. Klock II
ac33f1572b fix configure: allow both --enable-debug and --disable-debuginfo
in one invocation.
2015-07-20 10:07:53 +02:00
Manish Goregaokar
2c49927ae4 Rollup merge of #27028 - Gankro:travis, r=alexcrichton
This has travis build LLVM and rustc up to stage1, but not run any tests. It seems wasteful to have the ultimate might of travis running on every PR just to check for whitespace errors. This is a pure subset of the bootstrap, so it shouldn't ever spuriously break.

`make tidy` still runs first, so we still get \"fast errors\" on bad style. However once make tidy passes, the build will simply keep running to try to make rustc. `tidy` takes ~3 mins to complete, so if your build runs longer you can be confident we've gone on to build LLVM/rustc. In principle this is configured to use ccache (it shows up in the build logs as uploaded/downloaded), but I found no actual performance changes in using it.

Maybe someone at @travis-ci knows what's up with that.

For reference, here is a successful build with ccache enabled: https://travis-ci.org/Gankro/rust/builds/70821237

and one without: https://travis-ci.org/Gankro/rust/builds/70812814

Builds seem to take about 41mins regardless.

r? @alexcrichton
2015-07-16 10:49:23 +05:30
Alexis Beingessner
e8a03285b7 Ratchet up travis to build stage1 and our own LLVM.
Tidy is still run first for failing fast on the easy stuff.

To accomplish this we have travis actually persist ccache across builds. This
has LLVM built within 6 minutes, and all of stage1 built within 18.
Caching should work on fresh PRs (cache acquired from the master branch).
Because all we persist is ccache, there is minimal danger of persisting corrupt
build state.

I had to mangle `configure` a bit to make --enable-ccache work when custom
compilers are provide via CC and CXX.
2015-07-15 10:48:50 -07:00
Ryan Pendleton
7131e6f378 verify Apple LLVM versions independently, since the "based on LLVM" version is no longer reported 2015-07-13 00:33:36 -06:00
Alex Newman
0b7c4f57f6 Add netbsd amd64 support 2015-07-01 19:09:14 -07:00
Alex Crichton
ae36d4f72a mk: Add support for i686-pc-windows-msvc
This commit modifies the configure script and our makefiles to support building
32-bit MSVC targets. The MSVC toolchain is now parameterized over whether it can
produce a 32-bit or 64-bit binary. The configure script was updated to export
more variables at configure time, and the makefiles were rejiggered to
selectively reexport the relevant environment variables for the applicable
targets they're going to run for.
2015-06-27 13:02:18 -07:00
Dave Huseby
44d487d37c stupid missing dollar sign 2015-06-24 12:48:08 -07:00
Dave Huseby
97fb1c241c adding fallback to clang if gcc not available 2015-06-24 12:39:58 -07:00
Dave Huseby
4de71c7ef6 allowing fallback to clang on freebsd when needed 2015-06-24 12:39:58 -07:00
Sébastien Marie
e0283ab9c4 support llvm version 3.7 in configure
LLVM version 3.7 should be supported as external version (when using
--llvm-root configure option), as the current embedded LLVM version is
3.7.0svn.
2015-06-24 08:36:42 +02:00
OGINO Masanori
59399088ca Put CFG_BUILD triples into CFG_HOST triples.
I've configured with the parameters suggested by @brson in #18670 and
confirmed that it works on Gentoo Linux amd64.

Fixes #18670.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2015-06-22 12:53:34 +09:00
Ulrik Sverdrup
70269cd8ef mk: Build crates with relative paths to rustc
The path we pass to rustc will be visible in panic messages and
backtraces: they will be user visible!

Avoid junk in these paths by passing relative paths to rustc.

For most advanced users, `libcore` or `libstd` in the path will be
a clue to the location -- inside our code, not theirs.

Store both the relative path to the source as well as the absolute.
Use the relative path where it matters, compiling the main crates,
instead of changing all of the build process to cope with relative
paths.

Example output after this patch:

```
$ ./testunwrap
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:362
$ RUST_BACKTRACE=1 ./testunwrap
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:362
stack backtrace:
   1:     0x7ff59c1e9956 - sys::backtrace::write::h67a542fd2b201576des
                        at ../src/libstd/sys/unix/backtrace.rs:158
   2:     0x7ff59c1ed5b6 - panicking::on_panic::h3d21c41cdd5c12d41Xw
                        at ../src/libstd/panicking.rs:58
   3:     0x7ff59c1e7b6e - rt::unwind::begin_unwind_inner::h9f3a5440cebb8baeLDw
                        at ../src/libstd/rt/unwind/mod.rs:273
   4:     0x7ff59c1e7f84 - rt::unwind::begin_unwind_fmt::h4fe8a903e0c296b0RCw
                        at ../src/libstd/rt/unwind/mod.rs:212
   5:     0x7ff59c1eced7 - rust_begin_unwind
   6:     0x7ff59c22c11a - panicking::panic_fmt::h00b0cd49c98a9220i5B
                        at ../src/libcore/panicking.rs:64
   7:     0x7ff59c22b9e0 - panicking::panic::hf549420c0ee03339P3B
                        at ../src/libcore/panicking.rs:45
   8:     0x7ff59c1e621d - option::Option<T>::unwrap::h501963526474862829
   9:     0x7ff59c1e61b1 - main::hb5c91ce92347d1e6eaa
  10:     0x7ff59c1f1c18 - rust_try_inner
  11:     0x7ff59c1f1c05 - rust_try
  12:     0x7ff59c1ef374 - rt::lang_start::h7e51e19c6677cffe5Sw
                        at ../src/libstd/rt/unwind/mod.rs:147
                        at ../src/libstd/rt/unwind/mod.rs:130
                        at ../src/libstd/rt/mod.rs:128
  13:     0x7ff59c1e628e - main
  14:     0x7ff59b3f6b44 - __libc_start_main
  15:     0x7ff59c1e6078 - <unknown>
  16:                0x0 - <unknown>
```
2015-06-13 01:41:52 +02:00
Alex Crichton
3d74fbd496 configure: Fix LLVM output dir on MSVC
If LLVM assertions are enabled for MSVC, it looks like the output directory is
still just `Release` (or assertions are just always ignored on MSVC).
2015-06-03 22:08:47 -07:00
bors
5b56d73dc0 Auto merge of #25984 - Manishearth:rollup, r=Manishearth
- Successful merges: #25939, #25963, #25970, #25971, #25974
- Failed merges:
2015-06-03 09:44:26 +00:00
Manish Goregaokar
27dd5e9ce9 Rollup merge of #25971 - richo:configurable-python, r=alexcrichton
r? @alexcrichton
2015-06-03 14:46:41 +05:30
Manish Goregaokar
3fd41d61ab Rollup merge of #25939 - wca:fix-freebsd-configure, r=alexcrichton
Bug fixes for configure on FreeBSD:
- Don't ban using gcc; newer versions can be installed and other checks should enforce its suitability.
- Don't force Rust to link itself with /usr/local/lib{,gcc4[46]}, which causes builds to fail if Rust is already installed.  I've not been able to find an use case where this is actually necessary.
2015-06-03 14:46:40 +05:30
bors
a5979be9fe Auto merge of #25938 - wca:fix-clang-check-compatibility, r=alexcrichton
Not all /bin/sh have [[ available, so for compatibility using case..esac
for pattern matching is better.
2015-06-03 06:07:44 +00:00
Richo Healey
de4a1dca2b configure: Allow specifying your python with --python 2015-06-02 15:16:30 -07:00
bors
a49ae5bd43 Auto merge of #25858 - alexcrichton:disable-os-tls, r=brson
This commit adds a ./configure option called `--disable-elf-tls` which disables
ELF based TLS (that which is communicated to LLVM) on platforms which already
support it. OSX 10.6 does not support this form of TLS, and some users of Rust
need to target 10.6 and are unable to do so due to the usage of TLS. The
standard library will continue to use ELF based TLS on OSX by default (as the
officially supported platform is 10.7+), but this adds an option to compile the
standard library in a way that is compatible with 10.6.

Closes #25342
2015-06-01 19:51:57 +00:00
Andrew Foote
d4389c52ab remove duplicate "don't" 2015-05-30 18:13:51 -07:00