summaryrefslogtreecommitdiffstats
path: root/contrib/compiler-rt/lib/asan/asan_globals_win.h
blob: d4ed9c1f38e165c9e78655ff96dc9331d575fd2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//===-- asan_globals_win.h --------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Interface to the Windows-specific global management code. Separated into a
// standalone header to allow inclusion from asan_win_dynamic_runtime_thunk,
// which defines symbols that clash with other sanitizer headers.
//
//===----------------------------------------------------------------------===//

#ifndef ASAN_GLOBALS_WIN_H
#define ASAN_GLOBALS_WIN_H

#if !defined(_MSC_VER)
#error "this file is Windows-only, and uses MSVC pragmas"
#endif

#if defined(_WIN64)
#define SANITIZER_SYM_PREFIX
#else
#define SANITIZER_SYM_PREFIX "_"
#endif

// Use this macro to force linking asan_globals_win.cc into the DSO.
#define ASAN_LINK_GLOBALS_WIN() \
  __pragma(                     \
      comment(linker, "/include:" SANITIZER_SYM_PREFIX "__asan_dso_reg_hook"))

#endif // ASAN_GLOBALS_WIN_H
OpenPOWER on IntegriCloud