Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(852)

Side by Side Diff: third_party/protobuf/protoc-artifacts/build-protoc.sh

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/protobuf/protoc-artifacts/README.md ('k') | third_party/protobuf/python/README.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Builds protoc executable into target/protoc.exe 3 # Builds protoc executable into target/protoc.exe
4 # To be run from Maven. 4 # To be run from Maven.
5 # Usage: build-protoc.sh <OS> <ARCH> 5 # Usage: build-protoc.sh <OS> <ARCH>
6 # <OS> and <ARCH> are ${os.detected.name} and ${os.detected.arch} from os-maven- plugin 6 # <OS> and <ARCH> are ${os.detected.name} and ${os.detected.arch} from os-maven- plugin
7 OS=$1 7 OS=$1
8 ARCH=$2 8 ARCH=$2
9 9
10 if [[ $# < 2 ]]; then 10 if [[ $# < 2 ]]; then
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 # And they don't work under Mac. 205 # And they don't work under Mac.
206 if [[ "$OS" != osx ]]; then 206 if [[ "$OS" != osx ]]; then
207 LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++ -s" 207 LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++ -s"
208 fi 208 fi
209 209
210 export CXXFLAGS LDFLAGS 210 export CXXFLAGS LDFLAGS
211 211
212 TARGET_FILE=target/protoc.exe 212 TARGET_FILE=target/protoc.exe
213 213
214 cd "$WORKING_DIR"/.. && ./configure $CONFIGURE_ARGS && 214 cd "$WORKING_DIR"/.. && ./configure $CONFIGURE_ARGS &&
215 cd src && make clean && make google/protobuf/stubs/pbconfig.h $MAKE_TARGET && 215 cd src && make clean && make $MAKE_TARGET &&
216 cd "$WORKING_DIR" && mkdir -p target && 216 cd "$WORKING_DIR" && mkdir -p target &&
217 (cp ../src/protoc $TARGET_FILE || cp ../src/protoc.exe $TARGET_FILE) || 217 (cp ../src/protoc $TARGET_FILE || cp ../src/protoc.exe $TARGET_FILE) ||
218 exit 1 218 exit 1
219 219
220 if [[ "$OS" == osx ]]; then 220 if [[ "$OS" == osx ]]; then
221 # Since Mac linker doesn't accept "-s", we need to run strip 221 # Since Mac linker doesn't accept "-s", we need to run strip
222 strip $TARGET_FILE || exit 1 222 strip $TARGET_FILE || exit 1
223 fi 223 fi
224 224
225 checkArch $TARGET_FILE && checkDependencies $TARGET_FILE 225 checkArch $TARGET_FILE && checkDependencies $TARGET_FILE
OLDNEW
« no previous file with comments | « third_party/protobuf/protoc-artifacts/README.md ('k') | third_party/protobuf/python/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698