]> git.lizzy.rs Git - rust.git/commit
Statically link librustrt to libstd
authorAlex Crichton <alex@alexcrichton.com>
Sat, 16 Nov 2013 10:02:07 +0000 (02:02 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 30 Nov 2013 02:36:14 +0000 (18:36 -0800)
commit9fbba7b2eeabd073f9518f2dbd50f4eabb621c67
treedc6501789d9d004f5806714a706416c92f68cfdd
parente338a4154b134fc1d4628496d4ccf85b7af7c443
Statically link librustrt to libstd

This commit alters the build process of the compiler to build a static
librustrt.a instead of a dynamic version. This means that we can stop
distributing librustrt as well as default linking against it in the compiler.

This also means that if you attempt to build rust code without libstd, it will
no longer work if there are any landing pads in play. The reason for this is
that LLVM and rustc will emit calls to the various upcalls in librustrt used to
manage exception handling. In theory we could split librustrt into librustrt and
librustupcall. We would then distribute librustupcall and link to it for all
programs using landing pads, but I would rather see just one librustrt artifact
and simplify the build process.

The major benefit of doing this is that building a static rust library for use
in embedded situations all of a sudden just became a whole lot more feasible.

Closes #3361
36 files changed:
Makefile.in
mk/install.mk
mk/rt.mk
src/etc/snapshot.py
src/libstd/rtdeps.rs
src/rt/rustrt.def.in [deleted file]
src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
src/test/auxiliary/extern-crosscrate-source.rs
src/test/auxiliary/foreign_lib.rs
src/test/run-pass/anon-extern-mod-cross-crate-2.rs
src/test/run-pass/anon-extern-mod.rs
src/test/run-pass/c-stack-as-value.rs
src/test/run-pass/extern-call-deep.rs
src/test/run-pass/extern-call-deep2.rs
src/test/run-pass/extern-call-indirect.rs
src/test/run-pass/extern-call-scrub.rs
src/test/run-pass/extern-pass-TwoU16s.rs
src/test/run-pass/extern-pass-TwoU32s.rs
src/test/run-pass/extern-pass-TwoU64s.rs
src/test/run-pass/extern-pass-TwoU8s.rs
src/test/run-pass/extern-pass-char.rs
src/test/run-pass/extern-pass-double.rs
src/test/run-pass/extern-pass-u32.rs
src/test/run-pass/extern-pass-u64.rs
src/test/run-pass/extern-return-TwoU16s.rs
src/test/run-pass/extern-return-TwoU32s.rs
src/test/run-pass/extern-return-TwoU64s.rs
src/test/run-pass/extern-return-TwoU8s.rs
src/test/run-pass/extern-stress.rs
src/test/run-pass/extern-yield.rs
src/test/run-pass/foreign-call-no-runtime.rs
src/test/run-pass/foreign-dupe.rs
src/test/run-pass/foreign-no-abi.rs
src/test/run-pass/invoke-external-foreign.rs
src/test/run-pass/static-mut-foreign.rs
src/test/run-pass/struct-return.rs