rust/src/test
bors 0cd465087d Auto merge of #50105 - mixi:crt-included, r=alexcrichton
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:
  - eb064c8/community/rust/musl-fix-linux_musl_base.patch
  - 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-11 19:46:16 +00:00
..
auxiliary Remove directory src/rt 2018-02-24 16:45:39 +03:00
codegen Auto merge of #48786 - nagisa:fp, r=nikomatsakis 2018-05-01 08:05:51 +00:00
codegen-units Add codegen-units test for shared-generics. 2018-04-06 12:14:08 +02:00
compile-fail Auto merge of #50390 - hdhoang:46205_deny_by_default, r=nikomatsakis 2018-05-08 04:56:01 +00:00
compile-fail-fulldeps Auto merge of #49823 - Zoxc:term-str, r=alexcrichton 2018-05-10 16:27:32 +00:00
debuginfo Mark SingleVariant as repr(u8) in c-style-enum 2018-04-26 16:22:18 +02:00
incremental Don't recurse into allocations, use a global table instead 2018-04-14 12:21:46 +02:00
incremental-fulldeps Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
mir-opt Update mir-opt test to reflect change to MIR code-generation. 2018-05-04 13:17:13 +02:00
parse-fail Rollup merge of #49699 - zesterer:master, r=joshtriplett 2018-04-17 18:43:13 +02:00
pretty Remove all unstable placement features 2018-04-03 11:02:34 +02:00
run-fail dyn_trait feature-gate just for stage0 2018-04-27 10:04:58 -05:00
run-fail-fulldeps Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
run-make Allow for specifying a linker plugin for cross-language LTO 2018-05-09 16:42:35 +02:00
run-make-fulldeps Auto merge of #50105 - mixi:crt-included, r=alexcrichton 2018-05-11 19:46:16 +00:00
run-pass Rollup merge of #50505 - Aaronepower:add-test, r=oli-obk 2018-05-09 20:29:45 +08:00
run-pass-fulldeps Auto merge of #49823 - Zoxc:term-str, r=alexcrichton 2018-05-10 16:27:32 +00:00
run-pass-valgrind
rustdoc Auto merge of #50305 - GuillaumeGomez:fix-mod-stackoverflow, r=QuietMisdreavus 2018-05-07 23:18:12 +00:00
rustdoc-js Add exact-check option to rustdoc-js tests 2018-05-09 19:17:13 +02:00
rustdoc-ui Remove unwanted auto-linking and update 2018-04-16 23:37:11 +02:00
rustfix test: Make a dedicated testsuite for rustfix 2018-05-04 15:01:28 -07:00
ui Auto merge of #50440 - nikomatsakis:single-use-lifetimes, r=cramertj 2018-05-11 02:14:25 +00:00
ui-fulldeps Add test 2018-05-04 14:52:53 -07:00
COMPILER_TESTS.md Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00