From 98f9dd59fbf9b2410d3bae63d859fe40bf0147b7 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 7 Dec 2016 20:55:38 +0000 Subject: [PATCH] [CMake] Add check for HAVE_CRASHREPORTER_INFO This was also explicitly undef in CMake for some unknown reason. Hopefully this one won't kill all the bots. llvm-svn: 288977 --- cmake/config-ix.cmake | 8 ++++++++ include/llvm/Config/config.h.cmake | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 9c4658eb22a..7ce2eb0adf0 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -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 ) diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index ccdba3dd058..1331c4f4cbd 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -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. */