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.
This commit is contained in:
Pierre-Loup A. Griffais 2020-09-01 16:01:20 -07:00
parent aac57e7c75
commit 11dd8014ad

View file

@ -98,6 +98,24 @@ int main(int argc, char **argv)
}
}
// 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 )
{
sleep( 2 );