-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rebar.config cleanup, much smaller snappy.so object
Removed unnecessary linking with all the shared objects from google-snappy (it even linked with the unit tests object). The final snappy.so NIF object is now about 135Kb instead of 400Kb.
- Loading branch information
Showing
2 changed files
with
7 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
{port_sources, ["c_src/*.cc", "c_src/google-snappy/*.cc"]}. | ||
{so_name, "snappy.so"}. | ||
|
||
{erl_opts, [debug_info, warn_unused_vars, nowarn_shadow_vars, warn_unused_import]}. | ||
{port_sources, ["c_src/*.cc"]}. | ||
{port_envs, [ | ||
%% Make sure to link -lstdc++ on linux or solaris | ||
{"CXXFLAGS", "$CXXFLAGS -Ic_src"}, | ||
{"(linux|solaris)", "LDFLAGS", "$LDFLAGS -lstdc++"}, | ||
|
||
%% OS X Leopard flags for 64-bit | ||
{"darwin9.*-64$", "CXXFLAGS", "-m64"}, | ||
{"darwin9.*-64$", "LDFLAGS", "-arch x86_64"}, | ||
|
||
%% OS X Snow Leopard flags for 32-bit | ||
{"darwin10.*-32$", "CXXFLAGS", "-m32"}, | ||
{"darwin10.*-32$", "LDFLAGS", "-arch i386"} | ||
{"LDFLAGS", "$LDFLAGS c_src/google-snappy/snappy.o c_src/google-snappy/snappy-sinksource.o"} | ||
]}. | ||
|
||
{port_pre_script, {"support/build-google-snappy.sh", ""}}. | ||
{port_cleanup_script, "support/clean-google-snappy.sh"}. | ||
|
||
{so_name, "snappy.so"}. | ||
{eunit_opts, [verbose]}. |