From 811dbecaf5eafc434ba290784c787b49c293d0b8 Mon Sep 17 00:00:00 2001 From: Geoffrey Martin-Noble Date: Wed, 18 Aug 2021 11:19:31 -0700 Subject: [PATCH] [Bazel] Don't set HAVE_[DE]REGISTER_FRAME on Windows 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 | 2 ++ utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl index a52e35d..083a3e3 100644 --- a/utils/bazel/llvm-project-overlay/llvm/config.bzl +++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl @@ -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 + [ diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h index 4f529b0..03a2fa6 100644 --- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h +++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h @@ -75,10 +75,10 @@ /* #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 */ -- 2.7.4