Эх сурвалжийг харах

Fixed compile_extension.sh --release to actually enable optimization. (#7766)

Joshua Haberman 5 жил өмнө
parent
commit
ee5887daf1

+ 8 - 8
php/tests/compile_extension.sh

@@ -4,17 +4,17 @@ set -ex
 
 
 cd $(dirname $0)
 cd $(dirname $0)
 
 
+pushd  ../ext/google/protobuf
+phpize --clean
+rm -f configure.in configure.ac
+php make-preload.php
+phpize
 if [ "$1" = "--release" ]; then
 if [ "$1" = "--release" ]; then
-  CFLAGS="-Wall"
+  ./configure --with-php-config=$(which php-config)
 else
 else
   # To get debugging symbols in PHP itself, build PHP with:
   # To get debugging symbols in PHP itself, build PHP with:
   #   $ ./configure --enable-debug CFLAGS='-g -O0'
   #   $ ./configure --enable-debug CFLAGS='-g -O0'
-  CFLAGS="-g -O0 -Wall"
+  ./configure --with-php-config=$(which php-config) CFLAGS="-g -O0 -Wall"
 fi
 fi
-
-pushd  ../ext/google/protobuf
-phpize --clean
-rm -f configure.in configure.ac
-php make-preload.php
-phpize && ./configure --with-php-config=$(which php-config) CFLAGS="$CFLAGS" && make
+make
 popd
 popd