From 1ec80a35fa2d682f42727e6518d482eb410c4801 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 8 Sep 2017 18:15:04 +0800 Subject: main - Handle `--crate-type bin` --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 21575f00..2a5744c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -726,6 +726,9 @@ ProgramParams::ProgramParams(int argc, char *argv[]) if( strcmp(type_str, "rlib") == 0 ) { this->crate_type = ::AST::Crate::Type::RustLib; } + else if( strcmp(type_str, "bin") == 0 ) { + this->crate_type = ::AST::Crate::Type::Executable; + } else { ::std::cerr << "Unknown value for --crate-type" << ::std::endl; exit(1); -- cgit v1.2.3