diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-25 12:44:31 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-25 12:44:31 +0800 |
commit | 01ebe8360cb1c16382559dcce0dd74d4dc7a3fce (patch) | |
tree | cd0031322a647f5864a8b471ecfb47a9e323902c /src/main.cpp | |
parent | 7e55b0557b15ea6b57a564613cabb066e74b290e (diff) | |
download | mrust-01ebe8360cb1c16382559dcce0dd74d4dc7a3fce.tar.gz |
HACK - Emit a .hir for rdylib
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
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
|