diff options
author | John Hodge <tpg@mutabah.net> | 2018-12-09 00:38:10 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-12-09 00:38:10 +0800 |
commit | 2637ce90570d305eca74d2324793e730fb8a3452 (patch) | |
tree | 5bf3de8537ec1d74b5c38451dfa57d015d81c2d9 /src | |
parent | 412ab776b3e9bc6635d71cae1276a7d90600cf40 (diff) | |
download | mrust-2637ce90570d305eca74d2324793e730fb8a3452.tar.gz |
main - Set default target version to 1.29, allow environment to change that
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 15 |
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] ) |