about summary refs log tree commit diff
path: root/src/test/run-make-fulldeps
AgeCommit message (Collapse)AuthorLines
2018-06-03turn run-make test into a run-make-fulldeps testJorge Aparicio-0/+42
2018-05-31Add a test for issue 36710.Johannes Nixdorf-0/+66
This still expectedly fails for musl targets with +crt-static.
2018-05-17Revert "Add a test for issue 36710."Alex Crichton-57/+0
This reverts commit bd94bf5738c7a0fd148157831eabd1efede3b309.
2018-05-17Rename trans to codegen everywhere.Irina Popa-22/+22
2018-05-15Fix run-make wasm testsEric Huss-0/+80
Fixes #50711
2018-05-11Auto merge of #50105 - mixi:crt-included, r=alexcrichtonbors-0/+57
Use the correct crt*.o files when linking musl targets. This is supposed to support optionally using the system copy of musl libc instead of the included one if supported. This currently only affects the start files, which is enough to allow building rustc on musl targets. Most of the changes are analogous to crt-static. Excluding the start files is something musl based distributions usually patch into their copy of rustc: - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources. ## Reasons ### What breaks? Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend. ### How is it fixed? The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl). ### Why is it optional? In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue. ### Why are the start files still installed? This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc. ## Does it work? With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-11Add a test for issue 36710.Johannes Nixdorf-0/+57
2018-05-07Auto merge of #50454 - Manishearth:edition-preview-fixes, r=alexcrichtonbors-2/+2
Various edition preview fixes Implement a bunch of things discussed in the meeting.
2018-05-05Fix libtest-json testJohn Kåre Alsaker-1/+1
2018-05-04Make extern_absolute_paths only work on the new editionManish Goregaokar-2/+2
2018-04-27Add one more prelude layer for extern crate names passed with `--extern`Vadim Petrochenkov-0/+131
2018-04-16Auto merge of #49847 - sinkuu:save_analysis_implicit_extern, r=petrochenkovbors-0/+77
Fix save-analysis generation with extern_in_paths/extern_absolute_paths Fixes #48742.
2018-04-15Check generated save-analysis, instead of `bug!()`ingShotaro Yamada-0/+19
Injected crates don't have extern info. Let's skip them.
2018-04-12Rename alloc::Void to alloc::OpaqueSimon Sapin-2/+2
2018-04-12Use the GlobalAlloc trait for #[global_allocator]Simon Sapin-4/+4
2018-04-11Add testShotaro Yamada-0/+58
2018-04-07Auto merge of #49672 - alexcrichton:fix-another-std-core-cycle, ↵bors-0/+1
r=michaelwoerister Fix another circular deps link args issue It turns out that the support in #49316 wasn't enough to handle all cases notably the example in #48661. The underlying bug was connected to panic=abort where lang items were listed in the `missing_lang_items` sets but didn't actually exist anywhere. This caused the linker backend to deduce that start-group/end-group wasn't needed because not all items were defined. Instead the missing lang items that don't actually need to have a definition are filtered out and not considered for the start-group/end-group arguments Closes #48661
2018-04-06Update run-make/symbol-visibility to also cover shared-genericsMichael Woerister-7/+50
2018-04-05Rollup merge of #49253 - chmanchester:probing_fix, r=alexcrichtonkennytm-0/+50
Take the original extra-filename passed to a crate into account when resolving it as a dependency resolving it as a dependency. Fixes #46816
2018-04-04Fix another circulare deps link args issueAlex Crichton-0/+1
It turns out that the support in #49316 wasn't enough to handle all cases notably the example in #48661. The underlying bug was connected to panic=abort where lang items were listed in the `missing_lang_items` sets but didn't actually exist anywhere. This caused the linker backend to deduce that start-group/end-group wasn't needed because not all items were defined. Instead the missing lang items that don't actually need to have a definition are filtered out and not considered for the start-group/end-group arguments Closes #48661
2018-04-04Auto merge of #48171 - FraGag:doc-copy-clone-impls, r=nikomatsakisbors-0/+5
Better document the implementors of Clone and Copy There are two parts to this change. The first part is a change to the compiler and to the standard library (specifically, libcore) to allow implementations of `Clone` and `Copy` to be written for a subset of builtin types. By adding these implementations to libcore, they now show up in the documentation. This is a [breaking-change] for users of `#![no_core]`, because they will now have to supply their own copy of the implementations of `Clone` and `Copy` that were added in libcore. The second part is purely a documentation change to document the other implementors of `Clone` and `Copy` that cannot be described in Rust code (yet) and are thus provided by the compiler. Fixes #25893
2018-03-29rustc: Group linked libraries where neededAlex Crichton-0/+63
This commit fixes a longstanding issue with the compiler with circular dependencies between libcore and libstd. The `core` crate requires at least one symbol, the ability to unwind. The `std` crate is the crate which actually defines this symbol, but the `std` crate also depends on the `core` crate. This circular dependency is in general disallowed in Rust as crates cannot have cycles amongst them. A special exception is made just for core/std, but this is also unfortunately incompatible with how GNU linkers work. GNU linkers will process undefined symbols in a left-to-right fashion, only actually linking an rlib like libstd if there are any symbols used from it. This strategy is incompatible with circular dependencies because if we otherwise don't use symbols from libstd we don't discover that we needed it until we're later processing libcore's symbols! To fix this GNU linkers support the `--start-group` and `--end-group` options which indicate "libraries between these markers may have circular dependencies amongst them. The linker invocation has been updated to automatically pass these arguments when we're invoking a GNU linker and automatically calculate where the arguments need to go (around libstd and libcore) Closes #18807 Closes #47074
2018-03-28Run make tests for file resolutionChris Manchester-0/+50
2018-03-26Move some implementations of Clone and Copy to libcoreFrancis Gagné-0/+5
Add implementations of `Clone` and `Copy` for some primitive types to libcore so that they show up in the documentation. The concerned types are the following: * All primitive signed and unsigned integer types (`usize`, `u8`, `u16`, `u32`, `u64`, `u128`, `isize`, `i8`, `i16`, `i32`, `i64`, `i128`); * All primitive floating point types (`f32`, `f64`) * `bool` * `char` * `!` * Raw pointers (`*const T` and `*mut T`) * Shared references (`&'a T`) These types already implemented `Clone` and `Copy`, but the implementation was provided by the compiler. The compiler no longer provides these implementations and instead tries to look them up as normal trait implementations. The goal of this change is to make the implementations appear in the generated documentation. For `Copy` specifically, the compiler would reject an attempt to write an `impl` for the primitive types listed above with error `E0206`; this error no longer occurs for these types, but it will still occur for the other types that used to raise that error. The trait implementations are guarded with `#[cfg(not(stage0))]` because they are invalid according to the stage0 compiler. When the stage0 compiler is updated to a revision that includes this change, the attribute will have to be removed, otherwise the stage0 build will fail because the types mentioned above no longer implement `Clone` or `Copy`. For type variants that are variadic, such as tuples and function pointers, and for array types, the `Clone` and `Copy` implementations are still provided by the compiler, because the language is not expressive enough yet to be able to write the appropriate implementations in Rust. The initial plan was to add `impl` blocks guarded by `#[cfg(dox)]` to make them apply only when generating documentation, without having to touch the compiler. However, rustdoc's usage of the compiler still rejected those `impl` blocks. This is a [breaking-change] for users of `#![no_core]`, because they will now have to supply their own implementations of `Clone` and `Copy` for the primitive types listed above. The easiest way to do that is to simply copy the implementations from `src/libcore/clone.rs` and `src/libcore/marker.rs`. Fixes #25893
2018-03-25pgo: Move the tests to run-make-fulldeps, and make the profile file be in ↵Emilio Cobos Álvarez-0/+38
the tmp directory properly.
2018-03-22rustc: Add a `#[wasm_custom_section]` attributeAlex Crichton-0/+10478
This commit is an implementation of adding custom sections to wasm artifacts in rustc. The intention here is to expose the ability of the wasm binary format to contain custom sections with arbitrary user-defined data. Currently neither our version of LLVM nor LLD supports this so the implementation is currently custom to rustc itself. The implementation here is to attach a `#[wasm_custom_section = "foo"]` attribute to any `const` which has a type like `[u8; N]`. Other types of constants aren't supported yet but may be added one day! This should hopefully be enough to get off the ground with *some* custom section support. The current semantics are that any constant tagged with `#[wasm_custom_section]` section will be *appended* to the corresponding section in the final output wasm artifact (and this affects dependencies linked in as well, not just the final crate). This means that whatever is interpreting the contents must be able to interpret binary-concatenated sections (or each constant needs to be in its own custom section). To test this change the existing `run-make` test suite was moved to a `run-make-fulldeps` folder and a new `run-make` test suite was added which applies to all targets by default. This test suite currently only has one test which only runs for the wasm target (using a node.js script to use `WebAssembly` in JS to parse the wasm output).