From 11dd8014ad8de6a3ab0c1cdb7d307d97d22d3b1a Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Tue, 1 Sep 2020 16:01:20 -0700 Subject: [PATCH] main: set R600_DEBUG=nodcc ourselves if we have a sub-command. We know it's strictly better than not having it in the current state, so might as well, if we know it'll apply to clients as well. --- src/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 406a9b4..cd8ef1d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -97,6 +97,24 @@ int main(int argc, char **argv) break; } } + + // If we're going to execute something monolithic, might as well set this since it'll extend to our clients + if ( g_nSubCommandArg != 0 ) + { + const char *pchR600Debug = getenv( "R600_DEBUG" ); + + if ( pchR600Debug == nullptr ) + { + setenv( "R600_DEBUG", "nodcc", 1 ); + } + else if ( strstr( pchR600Debug, "nodcc" ) == nullptr ) + { + std::string strPreviousR600Debug = pchR600Debug; + strPreviousR600Debug.append( ",nodcc" ); + setenv( "R600_DEBUG", strPreviousR600Debug.c_str(), 1 ); + } + + } if ( bSleepAtStartup == true ) {