about summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2016-01-15Translate zero-sized return types as voidBjörn Steinbrink-0/+40
The only way to get a value for a zero-sized type is `undef`, so there's really no point in actually having a return type other than void for such types. Also, while the comment in return_type_is_void mentioned something about aiding C ABI support, @eddyb correctly pointed out on IRC that there is no such thing as a zero-sized type in C. And even with clang, which allows empty structs, those get translated as void return types as well. Fixes #28766
2016-01-15Address reviewer commentsNick Cameron-4/+5
[breaking-change] `OptLevel` variants are no longer `pub use`ed by rust::session::config. If you are using these variants, you must change your code to prefix the variant name with `OptLevel`.
2016-01-15Add a testNick Cameron-1/+23
And fix bustage in make check
2015-12-23Simply two cfg attributesMichael McConville-2/+2
2015-12-21Register new snapshotsAlex Crichton-4/+2
Lots of cruft to remove!
2015-12-21Auto merge of #30493 - semarie:openbsd-cc, r=alexcrichtonbors-5/+1
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-20openbsd: use specific linker for buildingSébastien Marie-0/+1
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-20remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGSSébastien Marie-5/+0
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-18Fix emitting asm and object file output at the same timeBjörn Steinbrink-0/+90
LLVM doesn't really support reusing the same module to emit more than one file. One bug this causes is that the IR is invalidated by the stack coloring pass when emitting the first file, and then the IR verifier complains by the time we try to emit the second file. Also, we get different binaries with --emit=asm,link than with just --emit=link. In some cases leading to segfaults. Unfortunately, it seems that at this point in time, the most sensible option to circumvent this problem is to just clone the whole llvm module for the asm output if we need both, asm and obj file output. Fixes #24876 Fixes #26235
2015-12-14Auto merge of #30328 - sanxiyn:include-type-name, r=alexcrichtonbors-0/+28
Fix #30260.
2015-12-13Better support for `--llvm-root`.Richard Diamond-5/+25
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-12Include type name in symbol for methodsSeo Sanghyeon-0/+28
2015-12-09Auto merge of #30208 - pnkfelix:fix-issue-30063, r=alexcrichtonbors-0/+46
When given `rustc -C codegen-units=4 --emit=obj`, reset units back to 1. Fix #30063 Note: while this code is careful to handle the case of mutliple emit types (e.g. `--emit=asm,obj`) by reporting all the emit types that conflict with codegen units in its warnings, an invocation with multiple emit types *and* `-o PATH` will continue to ignore the requested target path (with a warning), as it already does today, since the code that checks for that is further downstream. (Multiple emit types without `-o PATH` will "work", though it will downgrade codegen-units to 1 just like all the other cases.) r? @alexcrichton
2015-12-08regression test for issue #30063Felix S. Klock II-0/+46
2015-12-06Auto merge of #30187 - alexcrichton:stabilize-1.6, r=aturonbors-6/+3
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-6/+3
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-04Expand run-make test with regression tests for #30204Felix S. Klock II-0/+29
Fix #30204.
2015-11-26fix tests & rustdocAriel Ben-Yehuda-5/+7
2015-11-26make check worksAriel Ben-Yehuda-10/+21
2015-11-26remove csearch from the rest of rustcAriel Ben-Yehuda-0/+1
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+0
2015-11-20rustc: Fix `extern crate` being order dependentAlex Crichton-0/+46
This commit fixes a bug where a crate could fail to compile depending on the order of `extern crate` directives at the top of the crate. Specifically, if the same crate is found at two locations, then if it's loaded first via `--extern` it will not emit a duplicate warning, but if it's first loaded transitively via a dep and *then* via `--extern` an error will be emitted. The loader was tweaked to catch this scenario and coalesce the loading of these two crates to prevent errors from being emitted.
2015-11-18Patch graphviz tests to account for the fact that nested items are notNiko Matsakis-5/+5
listed (an improvement, I think).
2015-11-18MIR: Add pass that erases all regions right before transMichael Woerister-1/+1
2015-11-06Preserve public static items across LTOarcnmx-1/+5
2015-11-04Auto merge of #29478 - angelsl:msvc2, r=alexcrichtonbors-0/+38
r? @alexcrichton
2015-11-04Build compiler-rt/builtins with MSVCangelsl-0/+38
2015-11-03Pass the mir map to transNiko Matsakis-2/+2
2015-11-01Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichtonbors-1/+4
Note: for now, this change only affects `-windows-gnu` builds. So why was this `libgcc` dylib dependency needed in the first place? The stack unwinder needs to know about locations of unwind tables of all the modules loaded in the current process. The easiest portable way of achieving this is to have each module register itself with the unwinder when loaded into the process. All modules compiled by GCC do this by calling the __register_frame_info() in their startup code (that's `crtbegin.o` and `crtend.o`, which are automatically linked into any gcc output). Another important piece is that there should be only one copy of the unwinder (and thus unwind tables registry) in the process. This pretty much means that the unwinder must be in a shared library (unless everything is statically linked). Now, Rust compiler tries very hard to make sure that any given Rust crate appears in the final output just once. So if we link the unwinder statically to one of Rust's crates, everything should be fine. Unfortunately, GCC startup objects are built under assumption that `libgcc` is the one true place for the unwind info registry, so I couldn't find any better way than to replace them. So out go `crtbegin`/`crtend`, in come `rsbegin`/`rsend`! A side benefit of this change is that rustc is now more in control of the command line that goes to the linker, so we could stop using `gcc` as the linker driver and just invoke `ld` directly.
2015-10-31Remove PatWildMultiVadim Petrochenkov-1/+1
2015-10-24Auto merge of #29151 - wthrowe:linker-output-ICE, r=alexcrichtonbors-0/+60
I suspect this won't work on Windows, but let's be optimistic and try it before disabling.
2015-10-23Add a regression test for #29122 (fixed in #29134)William Throwe-0/+60
2015-10-21Auto merge of #29171 - nrc:servo-dxr, r=@arielb1bors-1/+1
2015-10-21save-analysis: don't recompute crate nameNick Cameron-1/+1
2015-10-19Fix up tests and docs.Vadim Chugunov-1/+4
2015-10-19Clean whitespaceCarlos Liam-1/+1
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines
2015-10-16trans: Use an isize to count the number of registers so we don't underflow ↵Luqman Aden-0/+25
for fn's with > 7 args in debug builds.
2015-10-15Update the comments for Win64 ABI in tests.Luqman Aden-54/+38
2015-10-15rust_trans: struct argument over ffi were passed incorrectly in some ↵Luqman Aden-0/+354
situations on x86_64.
2015-10-09Misc fixupsNick Cameron-4/+5
2015-10-09Make save-analysis work for `if let` etc.Nick Cameron-0/+19
2015-10-04Auto merge of #28806 - wthrowe:bare-outfile-fix, r=alexcrichtonbors-1/+3
The reason this was not failing is fascinating. The variable $(rustc) is empty, so the make recipe was expanded as " -o foo foo.rs". make interpreted this as an instruction to run the command "o foo foo.rs" and ignore any failure that occurred, because it uses a leading '-' on a command to signal that behavior.
2015-10-03Fix run-make/bare-outfile testWilliam Throwe-1/+3
The reason this was not failing is fascinating. The variable $(rustc) is empty, so the make recipe was expanded as " -o foo foo.rs". make interpreted this as an instruction to run the command "o foo foo.rs" and ignore any failure that occurred, because it uses a leading '-' on a command to signal that behavior.
2015-10-02Rollup merge of #28805 - wthrowe:compile-stdin, r=alexcrichtonSteve Klabnik-0/+5
2015-10-02Auto merge of #28768 - alexcrichton:dep-info++, r=brsonbors-10/+67
This PR closes out #28716 and #28735 by making two changes to the compiler: 1. The `--emit` flag to the compiler now supports the ability to specify the output file name of a partuclar emit type. For example `--emit dep-info=bar.d,asm=foo.s,link` is now accepted. 2. The dep-info emission now emits a dummy target for all input file names to protect against deleted files.
2015-10-02rustc: Emit phony targets for inputs in dep-infoAlex Crichton-2/+21
This helps protect against files being deleted to ensure that `make` won't emit errors. Closes #28735
2015-10-01Add a test that rustc can compile standard inputWilliam Throwe-0/+5
2015-09-30rustc: Swap link order of native libs/rust depsAlex Crichton-21/+46
This commit swaps the order of linking local native libraries and upstream native libraries on the linker command line. Detail of bugs this can cause can be found in #28595, and this change also invalidates the test case that was added for #12446 which is now considered a bug because the downstream dependency would need to declare that it depends on the native library somehow. Closes #28595
2015-09-30rustc: Support output filenames for each emit typeAlex Crichton-8/+46
Currently the compiler supports the ability to emit multiple output types as part of one compilation (e.g. asm, LLVM IR, bytecode, link, dep-info, etc). It does not, however, support the ability to customize the output filename for each of these output types. The `-o` flag is ignored if multiple emit types are specified (and the compiler emits a warning about this). Normally this doesn't matter too much, but in the case of `dep-info` it can lead to a number of problems (e.g. see #28716). By allowing customization of the output filename for each emit type we're able to solve the problems in that issue. This commit adds support for the `--emit` option to the compiler to look like: rustc foo.rs --emit dep-info=.deps/foo.d,link This indicates that the `dep-info` output type will be placed at `.deps/foo.d` and the `link` output type will otherwise be determined via the `--out-dir` and `-o` flags. Closes #28716
2015-09-27Rollup merge of #28673 - wthrowe:bad-archive, r=alexcrichtonManish Goregaokar-0/+5