rust/src/test/run-make
bors 71409184dc Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichton
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-11-01 17:15:29 +00:00
..
alloc-extern-crates syntax: Implement #![no_core] 2015-08-03 17:23:01 -07:00
allow-non-lint-warnings-cmdline Remove empty test files 2015-09-17 12:04:34 -04:00
allow-warnings-cmdline-stability Remove empty test files 2015-09-17 12:04:34 -04:00
archive-duplicate-names rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
bare-outfile Fix run-make/bare-outfile test 2015-10-03 17:20:45 -04:00
c-dynamic-dylib rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
c-dynamic-rlib rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
c-link-to-rust-dylib rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
c-link-to-rust-staticlib rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
c-static-dylib rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
c-static-rlib rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
codegen-options-parsing Slightly improved rustc error messages for invalid -C arguments 2014-11-15 14:51:22 +01:00
compile-stdin Add a test that rustc can compile standard input 2015-10-01 23:28:01 -04:00
compiler-lookup-paths Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
compiler-lookup-paths-2 rustc: Fix a leak in dependency= paths 2015-01-16 08:48:16 -08:00
crate-data-smoke rustc: Remove deprecated flags 2015-01-20 11:16:26 -08:00
crate-name-priority rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
debug-assertions rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00
dep-info rustc: Emit phony targets for inputs in dep-info 2015-10-02 09:33:06 -07:00
dep-info-spaces rustc: Remove deprecated flags 2015-01-20 11:16:26 -08:00
duplicate-output-flavors Deduplicate --crate-type arguments 2015-02-09 19:51:21 +02:00
dylib-chain rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
error-found-staticlib-instead-crate Improve error message, when found staticlib instead crate 2015-02-06 04:41:49 +03:00
error-writing-dependencies rustc: Remove deprecated flags 2015-01-20 11:16:26 -08:00
execution-engine save-analysis: don't recompute crate name 2015-10-21 12:04:48 +13:00
extern-diff-internal-name rustc: Turn off multiple versions of crate warning 2015-01-06 08:22:59 -08:00
extern-flag-disambiguates Use assert_eq! instead of assert! in tests 2015-06-13 14:55:55 +03:00
extern-flag-fun Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
extern-fn-generic rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
extern-fn-mangle rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
extern-fn-reachable trans: Link rlibs to dylibs with --whole-archive 2015-07-08 15:24:23 -07:00
extern-fn-struct-passing-abi trans: Use an isize to count the number of registers so we don't underflow for fn's with > 7 args in debug builds. 2015-10-16 21:10:52 -04:00
extern-fn-with-packed-struct rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
extern-fn-with-union rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
extern-overrides-distribution Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
extra-filename-with-temp-outputs msvc: Get codegen-units working 2015-07-07 20:07:20 -07:00
graphviz-flowgraph Remove PatWildMulti 2015-10-31 03:44:43 +03:00
include_bytes_deps Added a test for include_bytes! dep info 2015-04-15 10:40:04 -04:00
interdependent-c-libraries rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
intrinsic-unreachable Fallout in tests and docs from feature renamings 2015-06-17 09:07:16 -07:00
invalid-library rustc: Better error when loading invalid libraries 2014-03-01 23:36:28 -08:00
invalid-staticlib Don't ICE if an archive isn't actually an archive 2015-09-26 01:54:12 -04:00
issue-7349 Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
issue-11908 Test fixes and rebase conflicts 2014-07-05 12:46:42 -07:00
issue-14500 rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
issue-14698 Emit an error upon failing to create a temp dir instead of panicking 2015-09-16 13:52:02 -04:00
issue-15460 rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
issue-18943 Add regression test for #18943 2015-05-02 15:22:27 +02:00
issue-19371 rustc: Support output filenames for each emit type 2015-09-30 11:12:30 -07:00
issue-20626 Add regression test for #20626 2015-05-07 00:25:54 +02:00
issue-22131 Test fixes and review feedback 2015-04-10 00:58:10 -07:00
issue-24445 std: Fix thread_local! in non-PIE binaries 2015-04-15 09:14:48 -07:00
issue-25581 rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
issue-26006 Don’t ICE if fs::canonicalise fails in meta-load 2015-06-07 20:34:12 +03:00
issue-26092 rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
issue-28595 rustc: Swap link order of native libs/rust deps 2015-09-30 20:17:54 -07:00
libs-and-bins Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
libs-through-symlinks rustc: Start "stabilizing" some flags 2014-12-19 11:38:24 -08:00
link-path-order rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
linkage-attr-on-static rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
linker-output-non-utf8 Add a regression test for #29122 (fixed in #29134) 2015-10-23 17:11:33 -04:00
ls-metadata Move --ls behind -Z ls 2014-04-16 17:45:06 +02:00
lto-readonly-lib rustc: Fix permission denied error in 'ar' when lto is enabled 2014-09-29 15:07:14 +02:00
lto-smoke Move -Z lto to -C lto. 2014-09-21 02:17:31 -04:00
lto-smoke-c rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
manual-crate-name rustc: Repurpose the --crate-name CLI flag 2014-07-05 12:46:42 -07:00
manual-link Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
many-crates-but-no-match Strip trailing whitespace 2015-03-15 11:25:43 -07:00
metadata-flag-frobs-symbols Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
mismatching-target-triples syntax: Implement #![no_core] 2015-08-03 17:23:01 -07:00
missing-crate-dependency Strip trailing whitespace 2015-03-15 11:25:43 -07:00
mixing-deps Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
mixing-formats Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
mixing-libs Refactoring: Introduce distinct host and target rpath var setters. 2014-05-18 22:56:26 +02:00
no-duplicate-libs Fix up tests and docs. 2015-10-19 18:54:38 -07:00
no-intermediate-extras Remove workaround of #13793/#10872 2014-08-18 13:45:08 +09:00
obey-crate-type-flag Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
output-type-permutations rustc: Support output filenames for each emit type 2015-09-30 11:12:30 -07:00
output-with-hyphens rustc: Remove support for hyphens in crate names 2015-03-27 10:19:59 -07:00
prefer-dylib rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
prefer-rlib extern mod => extern crate 2014-02-14 22:55:21 -08:00
pretty-expanded Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
pretty-expanded-hygiene syntax: Implement #![no_core] 2015-08-03 17:23:01 -07:00
pretty-print-path-suffix Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00
pretty-print-to-file rustc: Remove deprecated flags 2015-01-20 11:16:26 -08:00
prune-link-args test: Fix run-make on windows 2014-04-28 11:45:30 +09:00
relocation-model rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
rlib-chain Use new attribute syntax in python files in src/etc too (#13478) 2014-04-14 21:00:31 +05:30
rustdoc-json Fallout: tests. As tests frequently elide things, lots of changes 2015-02-18 10:25:28 -05:00
save-analysis Clean whitespace 2015-10-19 11:16:31 -04:00
sepcomp-cci-copies Rollup merge of #23803 - richo:unused-braces, r=Manishearth 2015-03-28 18:12:06 +05:30
sepcomp-inlining rustc: Start "stabilizing" some flags 2014-12-19 11:38:24 -08:00
sepcomp-separate Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
simd-ffi Fix existing tests for new #[repr(simd)]. 2015-08-17 14:41:40 -07:00
simple-dylib rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
simple-rlib extern mod => extern crate 2014-02-14 22:55:21 -08:00
static-dylib-by-default rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
static-unwinding Use assert_eq! instead of assert! in tests 2015-06-13 14:55:55 +03:00
staticlib-blank-lib rustc: Add knowledge of separate lookup paths 2014-12-23 10:08:17 -08:00
suspicious-library rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
symbols-are-reasonable Use consistent terminology for byte string literals 2015-09-03 10:54:53 +03:00
symlinked-extern Properly canonicalize crate paths specified via --extern 2014-08-15 14:40:09 +02:00
symlinked-libraries rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
target-cpu-native Add support for target-cpu=native 2015-03-10 01:56:51 +01:00
target-specs Remove morestack support 2015-08-10 16:35:44 -07:00
test-harness Continue cfg syntax transition 2014-10-12 11:40:19 -07:00
trace-macros-flag Remove & from redirected output 2015-04-16 14:57:31 +02:00
unicode-input deprecate Unicode functions that will be moved to crates.io 2015-04-16 17:03:05 -04:00
use-extern-for-plugins syntax: Implement #![no_core] 2015-08-03 17:23:01 -07:00
version rustc: Start "stabilizing" some flags 2014-12-19 11:38:24 -08:00
volatile-intrinsics Fallout in tests and docs from feature renamings 2015-06-17 09:07:16 -07:00
weird-output-filenames Fix fallout of removing quotes in crate names 2015-03-27 11:43:40 -07:00
tools.mk run-make: search libstdc++ in /usr/local/lib too 2015-09-22 18:56:30 +02:00