xref: /aosp_15_r20/external/libchrome/crypto/crypto_export.h (revision 635a864187cb8b6c713ff48b7e790a6b21769273)
1*635a8641SAndroid Build Coastguard Worker // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2*635a8641SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*635a8641SAndroid Build Coastguard Worker // found in the LICENSE file.
4*635a8641SAndroid Build Coastguard Worker 
5*635a8641SAndroid Build Coastguard Worker #ifndef CRYPTO_CRYPTO_EXPORT_H_
6*635a8641SAndroid Build Coastguard Worker #define CRYPTO_CRYPTO_EXPORT_H_
7*635a8641SAndroid Build Coastguard Worker 
8*635a8641SAndroid Build Coastguard Worker // Defines CRYPTO_EXPORT so that functionality implemented by the crypto module
9*635a8641SAndroid Build Coastguard Worker // can be exported to consumers.
10*635a8641SAndroid Build Coastguard Worker 
11*635a8641SAndroid Build Coastguard Worker #if defined(COMPONENT_BUILD)
12*635a8641SAndroid Build Coastguard Worker #if defined(WIN32)
13*635a8641SAndroid Build Coastguard Worker 
14*635a8641SAndroid Build Coastguard Worker #if defined(CRYPTO_IMPLEMENTATION)
15*635a8641SAndroid Build Coastguard Worker #define CRYPTO_EXPORT __declspec(dllexport)
16*635a8641SAndroid Build Coastguard Worker #else
17*635a8641SAndroid Build Coastguard Worker #define CRYPTO_EXPORT __declspec(dllimport)
18*635a8641SAndroid Build Coastguard Worker #endif  // defined(CRYPTO_IMPLEMENTATION)
19*635a8641SAndroid Build Coastguard Worker 
20*635a8641SAndroid Build Coastguard Worker #else  // defined(WIN32)
21*635a8641SAndroid Build Coastguard Worker #if defined(CRYPTO_IMPLEMENTATION)
22*635a8641SAndroid Build Coastguard Worker #define CRYPTO_EXPORT __attribute__((visibility("default")))
23*635a8641SAndroid Build Coastguard Worker #else
24*635a8641SAndroid Build Coastguard Worker #define CRYPTO_EXPORT
25*635a8641SAndroid Build Coastguard Worker #endif
26*635a8641SAndroid Build Coastguard Worker #endif
27*635a8641SAndroid Build Coastguard Worker 
28*635a8641SAndroid Build Coastguard Worker #else  // defined(COMPONENT_BUILD)
29*635a8641SAndroid Build Coastguard Worker #define CRYPTO_EXPORT
30*635a8641SAndroid Build Coastguard Worker #endif
31*635a8641SAndroid Build Coastguard Worker 
32*635a8641SAndroid Build Coastguard Worker #endif  // CRYPTO_CRYPTO_EXPORT_H_
33