summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7104acb7..7130cf1c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -9,6 +9,7 @@
#include <iomanip>
#include <string>
#include <set>
+#include <version.hpp>
#include <string_view.hpp>
#include "parse/lex.hpp"
#include "parse/parseerror.hpp"
@@ -514,7 +515,10 @@ int main(int argc, char *argv[])
HIR_Expand_Closures(*hir_crate);
});
// - Construct VTables for all traits and impls.
- CompilePhaseV("Expand HIR VTables", [&]() { HIR_Expand_VTables(*hir_crate); });
+ // TODO: How early can this be done?
+ CompilePhaseV("Expand HIR VTables", [&]() {
+ HIR_Expand_VTables(*hir_crate);
+ });
// - And calls can be turned into UFCS
CompilePhaseV("Expand HIR Calls", [&]() {
HIR_Expand_UfcsEverything(*hir_crate);
@@ -561,11 +565,6 @@ int main(int argc, char *argv[])
MIR_CheckCrate(*hir_crate);
});
- // Second shot of constant evaluation (with full type information)
- CompilePhaseV("Constant Evaluate Full", [&]() {
- ConvertHIR_ConstantEvaluateFull(*hir_crate);
- });
-
if( params.debug.dump_hir )
{
// DUMP after consteval (full HIR again)
@@ -951,6 +950,12 @@ ProgramParams::ProgramParams(int argc, char *argv[])
this->show_help();
exit(0);
}
+ else if( strcmp(arg, "--version" ) == 0 ) {
+ ::std::cout << "MRustC " << Version_GetString() << ::std::endl;
+ ::std::cout << "- Build time: " << gsVersion_BuildTime << ::std::endl;
+ ::std::cout << "- Commit: " << gsVersion_GitHash << (gbVersion_GitDirty ? " (dirty tree)" : "") << ::std::endl;
+ exit(0);
+ }
// --out-dir <dir> >> Set the output directory for automatically-named files
else if( strcmp(arg, "--out-dir") == 0) {
if (i == argc - 1) {