================ @@ -116,6 +117,15 @@ ToolChain::executeToolChainProgram(StringRef Executable, }; std::string ErrorMessage; + int SecondsToWait = DefaultSecondsToWait; + if (std::optional<std::string> Str = + llvm::sys::Process::GetEnv("CLANG_TOOL_CHAIN_PROGRAM_WAIT")) { + int Val = std::atoi(Str->c_str()); + if (Val > 0) + SecondsToWait = Val; + else + SecondsToWait = 0; // infinite ---------------- jhuber6 wrote:
We should probably make sure the value is an integer. ```suggestion if (!llvm::to_integer(Arg->getValue(), Val)) return createStringError("CLANG_TOOLCHAIN_PROGRAM_TIMEOUT expected an integer, got '%s'", *Str); Val = std::max(Val, 0); ``` 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