diff options
author | cmumford <cmumford@google.com> | 2017-10-04 11:26:45 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2017-10-04 11:53:12 -0700 |
commit | 4a7e7f50dcf661cfffe71737650b0fb18e195d18 (patch) | |
tree | 613570bad946d1e0ac86fb86e0d12e97988527a8 /include/leveldb/status.h | |
parent | 542590d2a8eee3838f40b01405baa6d2f6f8c700 (diff) | |
download | leveldb-4a7e7f50dcf661cfffe71737650b0fb18e195d18.tar.gz |
Add LEVELDB_EXPORT macro to export public symbols.
gcc defaults to exporting all symbols, but other linkers do not. Adding
the LEVELDB_EXPORT macro allows a project to set LEVELDB_SHARED_LIBRARY
when building/linking with leveldb as a shared library.
This is to allow leveldb to be created as a shared library on all
platforms support by Chrome and enables a fix for
https://bugs.chromium.org/p/chromium/issues/detail?id=764810.
This also has the benefit of reducing the shared library size from
418863 to 380367 bytes (64-bit Linux).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171037148
Diffstat (limited to 'include/leveldb/status.h')
-rw-r--r-- | include/leveldb/status.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/leveldb/status.h b/include/leveldb/status.h index d9575f9..42ad4bb 100644 --- a/include/leveldb/status.h +++ b/include/leveldb/status.h @@ -14,11 +14,12 @@ #define STORAGE_LEVELDB_INCLUDE_STATUS_H_ #include <string> +#include "leveldb/export.h" #include "leveldb/slice.h" namespace leveldb { -class Status { +class LEVELDB_EXPORT Status { public: // Create a success status. Status() : state_(NULL) { } |