blob: d1eb60ad783a5f1c8a7a80742ebfded31ab735ca [file] [log] [blame]
Mirko Bonadei32ce18c2018-09-18 13:15:54 +02001/*
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
Mirko Bonadei028248c2018-10-10 12:19:02 +020019#ifdef WEBRTC_ENABLE_SYMBOL_EXPORT
Mirko Bonadei32ce18c2018-09-18 13:15:54 +020020
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
Mirko Bonadei028248c2018-10-10 12:19:02 +020037#endif // WEBRTC_ENABLE_SYMBOL_EXPORT
Mirko Bonadei32ce18c2018-09-18 13:15:54 +020038
39#ifndef RTC_EXPORT
40#define RTC_EXPORT
41#endif
42
43#endif // RTC_BASE_SYSTEM_RTC_EXPORT_H_