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/table_builder.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/table_builder.h')
-rw-r--r-- | include/leveldb/table_builder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/leveldb/table_builder.h b/include/leveldb/table_builder.h index 5fd1dc7..3c3acc7 100644 --- a/include/leveldb/table_builder.h +++ b/include/leveldb/table_builder.h @@ -14,6 +14,7 @@ #define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ #include <stdint.h> +#include "leveldb/export.h" #include "leveldb/options.h" #include "leveldb/status.h" @@ -23,7 +24,7 @@ class BlockBuilder; class BlockHandle; class WritableFile; -class TableBuilder { +class LEVELDB_EXPORT TableBuilder { public: // Create a builder that will store the contents of the table it is // building in *file. Does not close the file. It is up to the |