瀏覽代碼

Stop calling strip, pass -s to linker instead

Kun Zhang 10 年之前
父節點
當前提交
e4f1f93313
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      protoc-artifacts/build-protoc.sh

+ 4 - 4
protoc-artifacts/build-protoc.sh

@@ -4,8 +4,9 @@
 # huge binary.
 # huge binary.
 export CXXFLAGS="-DNDEBUG"
 export CXXFLAGS="-DNDEBUG"
 
 
-# Statically link libgcc and libstdc++
-export LDFLAGS="-static-libgcc -static-libstdc++"
+# Statically link libgcc and libstdc++.
+# -s to produce stripped binary
+export LDFLAGS="-static-libgcc -static-libstdc++ -s"
 
 
 # Under Cygwin we use MinGW GCC because the executable produced by Cygwin GCC
 # Under Cygwin we use MinGW GCC because the executable produced by Cygwin GCC
 # depends on Cygwin DLL.
 # depends on Cygwin DLL.
@@ -15,5 +16,4 @@ if [[ "$(uname)" == CYGWIN* ]]; then
   export CXXCPP=i686-pc-mingw32-cpp
   export CXXCPP=i686-pc-mingw32-cpp
 fi
 fi
 
 
-cd $(dirname "$0")/.. && ./configure --disable-shared && make &&
-  cd src && (strip protoc || strip protoc.exe)
+cd $(dirname "$0")/.. && ./configure --disable-shared && make