summaryrefslogtreecommitdiff
path: root/tools/minicargo/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/minicargo/main.cpp')
-rw-r--r--tools/minicargo/main.cpp28
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
{