mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-19 09:53:47 +00:00
[reland] 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. This was previously landed in crrev.com/c/5805458, but reverted due to crbug.com/362787700. Bug: chromium:362787700 Change-Id: I1fc8d9dc0b099c67ea7d774034b7691691ff2a50 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5825328 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
50faaf111e
commit
f9fa2d112b
@ -222,9 +222,11 @@ if (crashpad_is_android) {
|
|||||||
if (crashpad_is_in_chromium) {
|
if (crashpad_is_in_chromium) {
|
||||||
# Chromium's sanitizer runtime libraries do not include an unwinder,
|
# Chromium's sanitizer runtime libraries do not include an unwinder,
|
||||||
# so add Chromium's standard dependencies to link against the in-tree
|
# so add Chromium's standard dependencies to link against the in-tree
|
||||||
# libunwind.
|
# libunwind. The coverage wrapper similarly requires an unwinder, as
|
||||||
|
# well as a few other bits from libc++abi.
|
||||||
|
import("//build/config/coverage/coverage.gni")
|
||||||
import("//build/config/sanitizers/sanitizers.gni")
|
import("//build/config/sanitizers/sanitizers.gni")
|
||||||
no_default_deps = !using_sanitizer
|
no_default_deps = !use_clang_coverage && !using_sanitizer
|
||||||
remove_configs =
|
remove_configs =
|
||||||
[ "//build/config/android:default_orderfile_instrumentation" ]
|
[ "//build/config/android:default_orderfile_instrumentation" ]
|
||||||
}
|
}
|
||||||
|
@ -730,7 +730,10 @@ if (!crashpad_is_android && !crashpad_is_ios) {
|
|||||||
source_set("no_cfi_icall") {
|
source_set("no_cfi_icall") {
|
||||||
sources = [ "misc/no_cfi_icall.h" ]
|
sources = [ "misc/no_cfi_icall.h" ]
|
||||||
public_configs = [ "..:crashpad_config" ]
|
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") {
|
source_set("util_test") {
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "base/compiler_specific.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
@ -28,24 +29,6 @@ namespace crashpad {
|
|||||||
|
|
||||||
namespace {
|
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>
|
template <typename Functor>
|
||||||
struct FunctorTraits;
|
struct FunctorTraits;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user