add_dependencies(scudo_standalone gwp_asan)
endif()
-include_directories(../..)
+include_directories(../.. include)
set(SCUDO_CFLAGS)
flags.h
flags_parser.h
fuchsia.h
- interface.h
internal_defs.h
linux.h
list.h
vector.h
wrappers_c_checks.h
wrappers_c.h
+
+ include/scudo/interface.h
)
set(SCUDO_SOURCES
#include "common.h"
#include "flags.h"
#include "flags_parser.h"
-#include "interface.h"
#include "local_cache.h"
#include "memtag.h"
#include "quarantine.h"
#include "string_utils.h"
#include "tsd.h"
+#include "scudo/interface.h"
+
#ifdef GWP_ASAN_HOOKS
#include "gwp_asan/guarded_pool_allocator.h"
#include "gwp_asan/optional/backtrace.h"
-//===-- interface.h ---------------------------------------------*- C++ -*-===//
+//===-- scudo/interface.h ---------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#ifndef SCUDO_INTERFACE_H_
#define SCUDO_INTERFACE_H_
-#include "internal_defs.h"
-
extern "C" {
-WEAK INTERFACE const char *__scudo_default_options();
+__attribute__((weak)) const char *__scudo_default_options();
// Post-allocation & pre-deallocation hooks.
// They must be thread-safe and not use heap related functions.
-WEAK INTERFACE void __scudo_allocate_hook(void *ptr, size_t size);
-WEAK INTERFACE void __scudo_deallocate_hook(void *ptr);
+__attribute__((weak)) void __scudo_allocate_hook(void *ptr, size_t size);
+__attribute__((weak)) void __scudo_deallocate_hook(void *ptr);
-WEAK INTERFACE void __scudo_print_stats(void);
+void __scudo_print_stats(void);
typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
-I${COMPILER_RT_SOURCE_DIR}/include
-I${COMPILER_RT_SOURCE_DIR}/lib
-I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone
+ -I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone/include
-DGTEST_HAS_RTTI=0
-DSCUDO_DEBUG=1
# Extra flags for the C++ tests
}
config("scudo_config") {
- include_dirs = [ "//compiler-rt/lib/scudo/standalone" ]
+ include_dirs = [
+ "//compiler-rt/lib/scudo/standalone",
+ "//compiler-rt/lib/scudo/standalone/include",
+ ]
if (current_os == "android") {
cflags = [ "-fno-emulated-tls" ]
}