summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-25 12:44:31 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-25 12:44:31 +0800
commit01ebe8360cb1c16382559dcce0dd74d4dc7a3fce (patch)
treecd0031322a647f5864a8b471ecfb47a9e323902c /src
parent7e55b0557b15ea6b57a564613cabb066e74b290e (diff)
downloadmrust-01ebe8360cb1c16382559dcce0dd74d4dc7a3fce.tar.gz
HACK - Emit a .hir for rdylib
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a8352dc2..0802d2d4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -399,11 +399,16 @@ int main(int argc, char *argv[])
});
// Generate a .o
//HIR_Codegen_Lib(params.outfile + ".o", *hir_crate);
- // Link into a .rlib
+ // Link metatdata and object into a .rlib
break;
case ::AST::Crate::Type::RustDylib:
// Save a loadable HIR dump
+ CompilePhaseV("HIR Serialise", [&]() {
+ //HIR_Serialise(params.outfile + ".meta", *hir_crate);
+ HIR_Serialise(params.outfile, *hir_crate);
+ });
// Generate a .so/.dll
+ // TODO: Codegen and include the metadata in a non-loadable segment
break;
case ::AST::Crate::Type::CDylib:
// Generate a .so/.dll