Scope functions and variables so that static libraries build#171
Scope functions and variables so that static libraries build#171The9Cat merged 1 commit intoEXP-code:develfrom
Conversation
|
Thanks. Those look like reasonable changes. I'll queue them up for testing. If we supply a static library option, than it should work! TBH, we don't usually use this ourselves so I haven't tested this recently and it's not part of our CI. A static build probably can not be made to worth with Python support. So we may need to make that an exclusive behavior with If you are looking for a minimal build of EXP that contains only the key C++ interface without any of the driver binaries, you might try the |
I'm looking to include some EXP functionality in open source code that we often ship as binaries (for Linux, Microsoft Windows). The hope is to keep both the number of files and number of bytes down, and we're exploring whether static libraries achieves that better than shared libraries. I'll take a look at |
|
Got it. Static libs will almost always be larger than shared libs because they include all of their dependencies. The |
Apologies for the sloppy response I gave earlier. The hope is that compiling/linking the executable against the static libraries will bring into the executable only the parts (i.e. underlying object files (*.o)) from the static libraries that are strictly necessary. We'd then ship the executable binary, but not the libraries themselves. The experiment, still underway, is to determine whether that gives a substantially smaller footprint. |
|
I've rebased against |
Without these changes, I cannot build when
CMakeLists.txtis modified to haveThe changes are:
staticand/orinlineto functions defined in header files so that they are not publicly instantiated in multiple object files.numprocs,proc_namelen, andprocessor_namefrom several files so that they do not duplicate nor hide those defined inexputil/localmpi.cc.Note: with these changes, the build still works when I leave
CMakeLists.txtwith