mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 10:57:35 +03:00
Don't try to find a program via environment variable if that is empty (CC)
Whereas most OSs seem to remove the environment variable if it's cleared, OSX seems to keep it, explicitly cleared so to speak. I strongly suspect a cleared CC env variable to be the reason for the triggering assertion when trying to build dmd-testsuite's d_do_test tool in our OSX CI builds.
This commit is contained in:
parent
8211be11de
commit
43ff4373d6
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ static std::string getProgram(const char* name, const cl::opt<std::string>* opt,
|
|||
if (opt && opt->getNumOccurrences() > 0 && opt->length() > 0 && (prog = opt->c_str()))
|
||||
path = findProgramByName(prog);
|
||||
|
||||
if (path.empty() && envVar && (prog = getenv(envVar)))
|
||||
if (path.empty() && envVar && (prog = getenv(envVar)) && prog[0] != '\0')
|
||||
path = findProgramByName(prog);
|
||||
|
||||
if (path.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue