diff --git a/clang/include/clang/Config/config.h.cmake b/clang/include/clang/Config/config.h.cmake index 00c352b458c34..4194c00c756c4 100644 --- a/clang/include/clang/Config/config.h.cmake +++ b/clang/include/clang/Config/config.h.cmake @@ -85,4 +85,7 @@ /* Whether CIR is built into Clang */ #cmakedefine01 CLANG_ENABLE_CIR +/* Define if there is a custom bug report message */ +#cmakedefine CLANG_CUSTOM_BUG_REPORT_MSG "${CLANG_CUSTOM_BUG_REPORT_MSG}" + #endif diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp index e5c3c4ed5f804..b3fdab6177600 100644 --- a/clang/tools/driver/driver.cpp +++ b/clang/tools/driver/driver.cpp @@ -235,9 +235,13 @@ static int ExecuteCC1Tool(SmallVectorImpl &ArgV, int clang_main(int Argc, char **Argv, const llvm::ToolContext &ToolContext) { noteBottomOfStack(); +#ifdef CLANG_CUSTOM_BUG_REPORT_MSG + llvm::setBugReportMsg(CLANG_CUSTOM_BUG_REPORT_MSG); +#else llvm::setBugReportMsg("PLEASE submit a bug report to " BUG_REPORT_URL " and include the crash backtrace, preprocessed " "source, and associated run script.\n"); +#endif SmallVector Args(Argv, Argv + Argc); if (llvm::sys::Process::FixupStandardFileDescriptors())