diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-06-03 14:57:05 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-06-03 14:57:05 +0800 |
commit | bf8f8b4b4a9fe273451be59f68acafbe61968b83 (patch) | |
tree | 82993550cb3c88de0edbd55d79e4ea8e8cefffac /tools/minicargo/main.cpp | |
parent | 39b3cf53798683e496804f8322da2254b10850f4 (diff) | |
parent | a7fb27789a2b34543851d207120e2c0001ee9c27 (diff) | |
download | mrust-bf8f8b4b4a9fe273451be59f68acafbe61968b83.tar.gz |
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'tools/minicargo/main.cpp')
-rw-r--r-- | tools/minicargo/main.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/tools/minicargo/main.cpp b/tools/minicargo/main.cpp index 50e08619..b185881b 100644 --- a/tools/minicargo/main.cpp +++ b/tools/minicargo/main.cpp @@ -54,11 +54,29 @@ int main(int argc, const char* argv[]) return 1; } - Debug_DisablePhase("Load Repository"); - Debug_DisablePhase("Load Root"); - Debug_DisablePhase("Load Dependencies"); - Debug_DisablePhase("Enumerate Build"); - //Debug_DisablePhase("Run Build"); + { + Debug_DisablePhase("Load Repository"); + Debug_DisablePhase("Load Root"); + Debug_DisablePhase("Load Dependencies"); + Debug_DisablePhase("Enumerate Build"); + Debug_DisablePhase("Run Build"); + + if( const char* e = getenv("MINICARGO_DEBUG") ) + { + while( *e ) + { + const char* colon = ::std::strchr(e, ':'); + size_t len = colon ? colon - e : ::std::strlen(e); + + Debug_EnablePhase(::std::string(e, len).c_str()); + + if( colon ) + e = colon + 1; + else + e = e + len; + } + } + } try { |