Mirko Bonadei | 32ce18c | 2018-09-18 13:15:54 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef RTC_BASE_SYSTEM_RTC_EXPORT_H_ |
| 12 | #define RTC_BASE_SYSTEM_RTC_EXPORT_H_ |
| 13 | |
| 14 | // RTC_EXPORT is used to mark symbols as exported or imported when WebRTC is |
| 15 | // built or used as a shared library. |
| 16 | // When WebRTC is built as a static library the RTC_EXPORT macro expands to |
| 17 | // nothing. |
| 18 | |
| 19 | #ifdef COMPONENT_BUILD |
| 20 | |
| 21 | #ifdef WEBRTC_WIN |
| 22 | |
| 23 | #ifdef WEBRTC_LIBRARY_IMPL |
| 24 | #define RTC_EXPORT __declspec(dllexport) |
| 25 | #else |
| 26 | #define RTC_EXPORT __declspec(dllimport) |
| 27 | #endif |
| 28 | |
| 29 | #else // WEBRTC_WIN |
| 30 | |
| 31 | #if __has_attribute(visibility) && defined(WEBRTC_LIBRARY_IMPL) |
| 32 | #define RTC_EXPORT __attribute__((visibility("default"))) |
| 33 | #endif |
| 34 | |
| 35 | #endif // WEBRTC_WIN |
| 36 | |
| 37 | #endif // COMPONENT_BUILD |
| 38 | |
| 39 | #ifndef RTC_EXPORT |
| 40 | #define RTC_EXPORT |
| 41 | #endif |
| 42 | |
| 43 | #endif // RTC_BASE_SYSTEM_RTC_EXPORT_H_ |