summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-01-13 19:53:46 +0800
committerJohn Hodge <tpg@mutabah.net>2017-01-13 19:53:46 +0800
commit62009d81340a1616189d56bda20e79803309c0ad (patch)
treeef059971e68c1b2472141309c323d9e0be4c461f /src/main.cpp
parent6010662faa08057eb6ea1fab6dcf85c4d9604c3b (diff)
downloadmrust-62009d81340a1616189d56bda20e79803309c0ad.tar.gz
main - Invoke codegen for dylibs
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 31c02092..7f7a68be 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -449,16 +449,18 @@ int main(int argc, char *argv[])
// Link metatdata and object into a .rlib
break; }
- case ::AST::Crate::Type::RustDylib:
+ case ::AST::Crate::Type::RustDylib: {
+ #if 1
+ // Generate a .o
+ TransList items = CompilePhase<TransList>("Trans Enumerate", [&]() { return Trans_Enumerate_Public(*hir_crate); });
+ CompilePhaseV("Trans Codegen", [&]() { Trans_Codegen(params.outfile + ".o", *hir_crate, items, false); });
+ #endif
// Save a loadable HIR dump
CompilePhaseV("HIR Serialise", [&]() { HIR_Serialise(params.outfile, *hir_crate); });
- // - Enumerate codegen for visible and non-generic items
- //TransList items;
- //CompilePhaseV("Trans Enumerate", [&]() { Trans_Enumerate_Public(*hir_crate); });
- //CompilePhaseV("Trans Codegen", [&]() { Trans_Codegen(params.outfile, *hir_crate, items); });
+
// Generate a .so/.dll
// TODO: Codegen and include the metadata in a non-loadable segment
- break;
+ break; }
case ::AST::Crate::Type::CDylib:
// Generate a .so/.dll
break;