summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5db6d811..6eb726ac 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -34,7 +34,7 @@ bool g_debug_enabled = true;
::std::string g_cur_phase;
::std::set< ::std::string> g_debug_disable_map;
-TargetVersion gTargetVersion = TargetVersion::Rustc1_19;
+TargetVersion gTargetVersion = TargetVersion::Rustc1_29;
void init_debug_list()
{
@@ -1085,6 +1085,19 @@ ProgramParams::ProgramParams(int argc, char *argv[])
exit(1);
}
+
+ if( const auto* a = getenv("MRUSTC_TARGET_VER") )
+ {
+ if( strcmp(a, "1.19") == 0 ) {
+ gTargetVersion = TargetVersion::Rustc1_19;
+ }
+ else if( strcmp(a, "1.29") == 0 ) {
+ gTargetVersion = TargetVersion::Rustc1_29;
+ }
+ else {
+ }
+ }
+
if( const auto* a = getenv("MRUSTC_DUMP") )
{
while( a[0] )