================ @@ -116,6 +116,16 @@ ToolChain::executeToolChainProgram(StringRef Executable, }; std::string ErrorMessage; + int SecondsToWait = 60; + if (std::optional<std::string> Str = + llvm::sys::Process::GetEnv("CLANG_TOOLCHAIN_PROGRAM_TIMEOUT")) { + if (!llvm::to_integer(*Str, SecondsToWait)) + return llvm::createStringError(std::error_code(), + "CLANG_TOOLCHAIN_PROGRAM_TIMEOUT expected " + "an integer, got '" + + *Str + "'"); + SecondsToWait = std::min(SecondsToWait, 0); // infinite ---------------- jdenny-ornl wrote:
So that negative becomes 0 to mean infinite, that's obviously supposed to be max not min. Pushed a fix as 7c4eb60c9509c3a750961eac2dbcaad369d911f2. https://github.com/llvm/llvm-project/pull/102521 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits