]> git.lizzy.rs Git - rust.git/commit
Add a flag to force generating toplevel crate map
authorAlex Crichton <alex@alexcrichton.com>
Mon, 11 Nov 2013 17:26:24 +0000 (09:26 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 11 Nov 2013 17:26:24 +0000 (09:26 -0800)
commit2eb92b77a97b5657919d636700d72f7578af2a4f
tree709f241d16953388a40171dbfff5c6ebb578fc9a
parentb5e602ac563422e13a18be9f79100f96359d582a
Add a flag to force generating toplevel crate map

As we start to move runtime components into the crate map, it's becoming harder
and harder to start the runtime from a C function as rust is embedded in another
application. Right now if you compile a rust crate as a dynamic library which is
then linked to another application, when using std::rt::start there are no I/O
local services, even though rustuv was linked against and requested. The reason
for this is that there is no top level crate map available specifying where to
find libuv I/O.

This option is not meant to be used regularly, but rather whenever compiling a
final library crate and linking it into another application. This lifts the
requirement that to get a crate map you must have the final destination be an
executable.
src/librustc/driver/session.rs
src/librustc/middle/trans/base.rs