[Bazel] Don't set HAVE_[DE]REGISTER_FRAME on Windows
authorGeoffrey Martin-Noble <gcmn@google.com>
Wed, 18 Aug 2021 18:19:31 +0000 (11:19 -0700)
committerGeoffrey Martin-Noble <gcmn@google.com>
Wed, 18 Aug 2021 18:20:25 +0000 (11:20 -0700)
This is also done based on OS in the GN build
(https://github.com/llvm/llvm-project/blob/24b0df8686/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn#L193-L203).
Of course the right way would be to set up platform detection, but that
remains TODO.

Reviewed By: csigg

Differential Revision: https://reviews.llvm.org/D107375

utils/bazel/llvm-project-overlay/llvm/config.bzl
utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h

index a52e35d..083a3e3 100644 (file)
@@ -32,6 +32,8 @@ posix_defines = [
     "HAVE_PTHREAD_GETNAME_NP=1",
     "HAVE_PTHREAD_SETNAME_NP=1",
     "HAVE_PTHREAD_GETSPECIFIC=1",
+    "HAVE_REGISTER_FRAME=1",
+    "HAVE_DEREGISTER_FRAME=1",
 ]
 
 linux_defines = posix_defines + [
index 4f529b0..03a2fa6 100644 (file)
 /* #undef HAVE_DLADDR */
 
 /* Define to 1 if we can register EH frames on this platform. */
-#define HAVE_REGISTER_FRAME 1
+/* HAVE_REGISTER_FRAME defined in Bazel*/
 
 /* Define to 1 if we can deregister EH frames on this platform. */
-#define HAVE_DEREGISTER_FRAME 1
+/* HAVE_DEREGISTER_FRAME defined in Bazel*/
 
 /* Define if __unw_add_dynamic_fde() is available on this platform. */
 /* HAVE_UNW_ADD_DYNAMIC_FDE defined in Bazel */