Commit 36093ca4 authored by Kun Zhang's avatar Kun Zhang

Tweak flags to make statically-linked binary under Cygwin

parent cd4e9e72
......@@ -2,7 +2,18 @@
# Override the default value set in configure.ac that has '-g' which produces
# huge binary.
export CXXFLAGS=-DNDEBUG
export CXXFLAGS="-DNDEBUG"
# Statically link libgcc and libstdc++
export LDFLAGS="-static-libgcc -static-libstdc++"
# Under Cygwin we use MinGW GCC because the executable produced by Cygwin GCC
# depends on Cygwin DLL.
if [[ "$(uname)" == CYGWIN* ]]; then
export CC=i686-pc-mingw32-gcc
export CXX=i686-pc-mingw32-c++
export CXXCPP=i686-pc-mingw32-cpp
fi
cd $(dirname "$0")/.. && ./configure --disable-shared && make &&
cd src && (strip protoc || strip protoc.exe)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment