forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KUDU-46: build exported client library
There are three parts to this commit: 1. Sprinkling of KUDU_EXPORT on those classes we want clients to interact with directly. KUDU_NO_EXPORT was also used to hide some nested classes. 2. CMake logic for a new build type: the exported client library. a. All symbols are hidden by default, so that only the symbols in the whitelist (specified by KUDU_EXPORT) are available for dynamic linking. b. Some thirdparty libraries are linked as 'local' via linker version script. Notable exceptions are glog and gflags, the former of which is needed by the client headers directly and the latter of which is sufficiently difficult to differentiate from the former. c. The build itself is static even though the library is shared: in order to merge _all_ dependencies into the library, we need them to be available in static archive form. d. This kind of client library is quite special. It's got all transitive dependencies linked in, and many of its symbols are hidden. As such, a bunch of unit tests won't run properly, and some can't even build. e. Why can't we just build the client library a second time with special flags? Why do we need a new build type? The problem stems from symbol visibility: in order to "hide everything by default", we need to recompile every source file that's part of the library with -fvisibility=hidden. That's enough code that whitelisting it all is hard; by contrast, a new build type is easy. 3. CMake logic for "make install", which produces a directory tree with the client library and all necessary headers. I chose to explicitly list every header instead of globbing, so that we can maintain fine-grained control over the list and so we'll know exactly what we're shipping. Note that the exported library is only buildable on systems with boost<1.42. On newer systems, there's still a dependency on an -fPIC libboost_system which nobody has. Change-Id: I0a99647563bbf58d3e293dfebb5c124d94288eef Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3682 Tested-by: jenkins Reviewed-by: Todd Lipcon <[email protected]>
- Loading branch information
1 parent
37dc989
commit 872aba4
Showing
19 changed files
with
273 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.