[llvm] r340185 - Add cmake option to disable minidumps, default it to off

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 23 11:24:36 PDT 2018


Hi Reid,

Your change caused a (probably) unintended change in the minidump behavior when the option you added is turned on, but crash dumping was turned off via other means which set coreFilesPrevented to true. I have hopefully fixed this up in r340561 to get both options to work together as intended.

Douglas Yung

> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
> Behalf Of Reid Kleckner via llvm-commits
> Sent: Monday, August 20, 2018 9:50
> To: llvm-commits at lists.llvm.org
> Subject: [llvm] r340185 - Add cmake option to disable minidumps,
> default it to off
> 
> Author: rnk
> Date: Mon Aug 20 09:49:54 2018
> New Revision: 340185
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=340185&view=rev
> Log:
> Add cmake option to disable minidumps, default it to off
> 
> Since crash dumping landed in r268519, May 2016, I have not once seen
> anyone use an uploaded minidump to debug a compiler crash. Therefore,
> I'm turning this off by default. The dumps clutter up user and buildbot
> temp directories. Each file is only about 56KB, but it adds up.
> 
> In the context of clang, the extra line about the minidump confuses
> users, when what we really want from them is the pre-processed source
> code.
> 
> Modified:
>     llvm/trunk/CMakeLists.txt
>     llvm/trunk/include/llvm/Config/config.h.cmake
>     llvm/trunk/lib/Support/Process.cpp
> 
> Modified: llvm/trunk/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/CMakeLists.txt?rev=340185&r1=340184&r2=340185&view=d
> iff
> =======================================================================
> =======
> --- llvm/trunk/CMakeLists.txt (original)
> +++ llvm/trunk/CMakeLists.txt Mon Aug 20 09:49:54 2018
> @@ -320,6 +320,8 @@ if(LLVM_ENABLE_CRASH_OVERRIDES)
>    set(ENABLE_CRASH_OVERRIDES 1)
>  endif()
> 
> +option(LLVM_ENABLE_CRASH_DUMPS "Turn on memory dumps on crashes.
> Currently only implemented on Windows." OFF)
> +
>  option(LLVM_ENABLE_FFI "Use libffi to call external functions from the
> interpreter" OFF)
>  set(FFI_LIBRARY_DIR "" CACHE PATH "Additional directory, where CMake
> should search for libffi.so")
>  set(FFI_INCLUDE_DIR "" CACHE PATH "Additional directory, where CMake
> should search for ffi.h or ffi/ffi.h")
> 
> Modified: llvm/trunk/include/llvm/Config/config.h.cmake
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=340185&r1=340
> 184&r2=340185&view=diff
> =======================================================================
> =======
> --- llvm/trunk/include/llvm/Config/config.h.cmake (original)
> +++ llvm/trunk/include/llvm/Config/config.h.cmake Mon Aug 20 09:49:54
> 2018
> @@ -13,6 +13,9 @@
>  /* Define to 1 to enable crash overrides, and to 0 otherwise. */
>  #cmakedefine01 ENABLE_CRASH_OVERRIDES
> 
> +/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */
> +#cmakedefine01 LLVM_ENABLE_CRASH_DUMPS
> +
>  /* Define to 1 if you have the `backtrace' function. */
>  #cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
> 
> 
> Modified: llvm/trunk/lib/Support/Process.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Support/Process.cpp?rev=340185&r1=340184&r2=3401
> 85&view=diff
> =======================================================================
> =======
> --- llvm/trunk/lib/Support/Process.cpp (original)
> +++ llvm/trunk/lib/Support/Process.cpp Mon Aug 20 09:49:54 2018
> @@ -15,6 +15,7 @@
>  #include "llvm/ADT/STLExtras.h"
>  #include "llvm/ADT/StringExtras.h"
>  #include "llvm/Config/llvm-config.h"
> +#include "llvm/Config/config.h"
>  #include "llvm/Support/FileSystem.h"
>  #include "llvm/Support/Path.h"
>  #include "llvm/Support/Program.h"
> @@ -86,7 +87,7 @@ static const char colorcodes[2][2][8][10
>  static bool coreFilesPrevented = false;
> 
>  bool Process::AreCoreFilesPrevented() {
> -  return coreFilesPrevented;
> +  return !LLVM_ENABLE_CRASH_DUMPS;
>  }
> 
>  // Include the platform-specific parts of this class.
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list