From 38fcfd916a9f371ed4c059a254a80b40f4f54e3e Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 23 Oct 2016 20:59:10 +0800 Subject: Misc - Tiny changes to get farther towards compiling rustc --- src/expand/crate_tags.cpp | 3 +++ src/main.cpp | 11 +++-------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/expand/crate_tags.cpp b/src/expand/crate_tags.cpp index 79d2cbf6..df6b339b 100644 --- a/src/expand/crate_tags.cpp +++ b/src/expand/crate_tags.cpp @@ -26,6 +26,9 @@ public: if( name == "rlib" || name == "lib" ) { crate.m_crate_type = AST::Crate::Type::RustLib; } + else if( name == "dylib" || name == "rdylib" ) { + crate.m_crate_type = AST::Crate::Type::RustDylib; + } else { ERROR(sp, E0000, "Unknown crate type '" << name << "'"); } diff --git a/src/main.cpp b/src/main.cpp index 24a5ad57..a8352dc2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -372,18 +372,13 @@ int main(int argc, char *argv[]) CompilePhaseV("MIR Validate", [&]() { MIR_CheckCrate(*hir_crate); }); - - if( params.last_stage == ProgramParams::STAGE_MIR ) { - return 0; - } // Optimise the MIR // TODO: MIR Optimisation - //CompilePhaseV("Dump MIR", [&]() { - // ::std::ofstream os (FMT(params.outfile << "_4_mir_opt.rs")); - // MIR_Dump( os, *hir_crate ); - // }); + if( params.last_stage == ProgramParams::STAGE_MIR ) { + return 0; + } // TODO: Pass to mark items that are // - Signature Exportable (public) -- cgit v1.2.3