Browse files

COUCHDB-1482 - use correct linker flags to build snappy_nif.dll on Wi…

…ndows

- Windows 2008 Server enforces stricter requirements on C runtime dependencies than non-server versions
- Erlang/OTP cc.sh and ld.sh build scripts mix release and debug runtime dependencies in in some circumstances
- this prevents loading the NIF from loading at all
- adding optimisation flags ensures the OTP build does the right thing
Thanks Nick North for identifying this bug.
  • Loading branch information...
1 parent 12fc5ea commit a6eaf9f15625ebcd361cd2cf277026a8318e818c @dch committed May 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/snappy/Makefile.am
View
2 src/snappy/Makefile.am
@@ -56,7 +56,7 @@ snappy_nif_la_LDFLAGS = -module -avoid-version
if WINDOWS
snappy_nif_la_LDFLAGS += -no-undefined
-snappy_nif_la_CXXFLAGS += -EHsc
+snappy_nif_la_CXXFLAGS += -EHsc -Ox
SNAPPY_SO_NAME = snappy_nif.dll
else
SNAPPY_SO_NAME = snappy_nif.so

0 comments on commit a6eaf9f

Please sign in to comment.