Parcourir la source

Make it work on Mac

Kun Zhang il y a 10 ans
Parent
commit
87b85019e6
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      protoc-artifacts/build-protoc.sh

+ 5 - 2
protoc-artifacts/build-protoc.sh

@@ -85,8 +85,11 @@ fi
 export CXXFLAGS="-DNDEBUG"
 
 # Statically link libgcc and libstdc++.
-# -s to produce stripped binary
-export LDFLAGS="-static-libgcc -static-libstdc++ -s"
+# -s to produce stripped binary.
+# And they don't work under Mac.
+if [[ "$OS" != osx ]]; then
+  export LDFLAGS="-static-libgcc -static-libstdc++ -s"
+fi
 
 cd "$WORKING_DIR"/.. && ./configure $CONFIGURE_ARGS &&
   cd src && make clean && make $MAKE_TARGET &&