mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 06:31:50 +08:00
Don't redefine macros from base/compiler_specific.h.
`DISABLE_CFI_ICALL` is already defined in that header; use it. This is both simpler and less likely to trigger macro redefinition errors. Bug: none Change-Id: I3ecfe9b6dc4ac42c6a69b3fd9c6d2c68fe8e62a2 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5805458 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
adb22c8169
commit
458bdec985
@ -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") {
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#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 <typename Functor>
|
||||
struct FunctorTraits;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user