[CMake] Add check for HAVE_CRASHREPORTER_INFO
authorChris Bieneman <beanz@apple.com>
Wed, 7 Dec 2016 20:55:38 +0000 (20:55 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 7 Dec 2016 20:55:38 +0000 (20:55 +0000)
This was also explicitly undef in CMake for some unknown reason.

Hopefully this one won't kill all the bots.

llvm-svn: 288977

llvm/cmake/config-ix.cmake
llvm/include/llvm/Config/config.h.cmake

index 9c4658e..7ce2eb0 100755 (executable)
@@ -79,6 +79,14 @@ check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT)
 check_include_file(mach/mach.h HAVE_MACH_MACH_H)
 check_include_file(histedit.h HAVE_HISTEDIT_H)
 check_include_file(CrashReporterClient.h HAVE_CRASHREPORTERCLIENT_H)
+if(APPLE)
+  include(CheckCSourceCompiles)
+  CHECK_C_SOURCE_COMPILES("
+     static const char *__crashreporter_info__ = 0;
+     asm(\".desc ___crashreporter_info__, 0x10\");
+     int main() { return 0; }"
+    HAVE_CRASHREPORTER_INFO)
+endif()
 
 # library checks
 if( NOT PURE_WINDOWS )
index ccdba3d..1331c4f 100644 (file)
@@ -20,7 +20,7 @@
 #cmakedefine HAVE_CRASHREPORTERCLIENT_H
 
 /* can use __crashreporter_info__ */
-#undef HAVE_CRASHREPORTER_INFO
+#cmakedefine01 HAVE_CRASHREPORTER_INFO
 
 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
    don't. */