]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
2 | // This source code is licensed under both the GPLv2 (found in the | |
3 | // COPYING file in the root directory) and Apache 2.0 License | |
4 | // (found in the LICENSE.Apache file in the root directory). | |
5 | ||
6 | #pragma once | |
7 | ||
8 | /** | |
9 | * Macro for marking functions as having public visibility. | |
10 | */ | |
11 | #if defined(__GNUC__) | |
12 | #define FOLLY_EXPORT __attribute__((__visibility__("default"))) | |
13 | #else | |
14 | #define FOLLY_EXPORT | |
15 | #endif | |
16 | ||
17 | #if defined(__has_feature) | |
18 | #define FOLLY_HAS_FEATURE(...) __has_feature(__VA_ARGS__) | |
19 | #else | |
20 | #define FOLLY_HAS_FEATURE(...) 0 | |
21 | #endif | |
22 | ||
23 | #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ | |
24 | #ifndef FOLLY_SANITIZE_THREAD | |
25 | #define FOLLY_SANITIZE_THREAD 1 | |
26 | #endif | |
27 | #endif |