rustc: Temporarily inject libgreen with librustuv

This measure is simply to allow programs to continue compiling as they once did.
In the future, this needs a more robust solution to choose how to start with
libgreen or libnative.
This commit is contained in:
Alex Crichton 2013-12-13 19:35:31 -08:00
parent aad9fbf6b6
commit 39dbcd7b01
1 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,15 @@ impl fold::ast_fold for StandardLibraryInjector {
}];
if use_uv(&crate) && !*self.sess.building_library {
vis.push(ast::view_item {
node: ast::view_item_extern_mod(self.sess.ident_of("green"),
None,
~[vers_item],
ast::DUMMY_NODE_ID),
attrs: ~[],
vis: ast::private,
span: dummy_sp()
});
vis.push(ast::view_item {
node: ast::view_item_extern_mod(self.sess.ident_of("rustuv"),
None,