diff --git a/util/BUILD.gn b/util/BUILD.gn index d4f4b2d0..8d037fea 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -730,7 +730,10 @@ if (!crashpad_is_android && !crashpad_is_ios) { source_set("no_cfi_icall") { sources = [ "misc/no_cfi_icall.h" ] public_configs = [ "..:crashpad_config" ] - public_deps = [ "$mini_chromium_source_parent:build" ] + public_deps = [ + "$mini_chromium_source_parent:base", + "$mini_chromium_source_parent:build", + ] } source_set("util_test") { diff --git a/util/misc/no_cfi_icall.h b/util/misc/no_cfi_icall.h index bb3e5940..7410026d 100644 --- a/util/misc/no_cfi_icall.h +++ b/util/misc/no_cfi_icall.h @@ -18,6 +18,7 @@ #include #include +#include "base/compiler_specific.h" #include "build/build_config.h" #if BUILDFLAG(IS_WIN) @@ -28,24 +29,6 @@ namespace crashpad { namespace { -// Sanitizers annotations. -#if defined(__has_attribute) -#if __has_attribute(no_sanitize) -#define NO_SANITIZE(what) __attribute__((no_sanitize(what))) -#endif -#endif -#if !defined(NO_SANITIZE) -#define NO_SANITIZE(what) -#endif - -// DISABLE_CFI_ICALL -- Disable Control Flow Integrity indirect call checks. -#if BUILDFLAG(IS_WIN) -// Windows also needs __declspec(guard(nocf)). -#define DISABLE_CFI_ICALL NO_SANITIZE("cfi-icall") __declspec(guard(nocf)) -#else -#define DISABLE_CFI_ICALL NO_SANITIZE("cfi-icall") -#endif - template struct FunctorTraits;