rust/mk
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
..
cfg Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichton 2015-11-01 17:15:29 +00:00
clean.mk Remove morestack support 2015-08-10 16:35:44 -07:00
crates.mk review comments 2015-10-09 21:44:44 +13:00
ctags.mk Update the ctags rules and targets. 2015-07-30 06:35:42 +10:00
debuggers.mk debuginfo: Create common debugger pretty printer module. 2015-05-30 20:06:08 +02:00
dist.mk mk: Package libstdc++-6.dll on x86_64 MinGW 2015-10-25 10:32:11 -07:00
docs.mk Introduce 'make doc' -> 'make docs' 2015-09-02 22:00:58 -04:00
grammar.mk Make lexer tooling message more generic 2015-09-23 11:43:49 -04:00
host.mk mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
install.mk mk: Split out a standard library package 2015-10-15 16:03:14 -07:00
llvm.mk add support for non-standard name of stdc++ library 2015-09-18 18:03:59 +02:00
main.mk Bump version to 1.6 2015-10-27 17:47:43 -07:00
perf.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
platform.mk Pass libstdc++.so path to linker under OpenBSD 2015-09-20 19:06:37 +02:00
prepare.mk mk: Split out a standard library package 2015-10-15 16:03:14 -07:00
reconfig.mk mk: Fix reconfiguring top-level ./configure 2015-06-17 17:32:11 -07:00
rt.mk Revert "Build compiler-rt/builtins with MSVC" 2015-10-30 10:36:38 -07:00
rustllvm.mk trans: Use LLVM's writeArchive to modify archives 2015-07-10 09:06:21 -07:00
snap.mk mk: Remove extra whitespace before line continuation backslashes 2014-07-23 08:41:55 -07:00
stage0.mk mk/stage0: complain instead of creating an empty file 2014-11-20 16:00:12 -05:00
target.mk Use gcc -print-file-name for finding C runtime startup objects: 2015-10-21 10:05:19 -07:00
tests.mk rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
util.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00