@@ -46,6 +46,7 @@ readonly script_dir="."
4646# Change this if your checkout of github.com/protocolbuffers/protobuf is in a
4747# different location.
4848readonly GOOGLE_PROTOBUF_CHECKOUT=${GOOGLE_PROTOBUF_CHECKOUT:- " $script_dir /../../protobuf" }
49+ readonly PROTOC=${PROTOC:- " ${GOOGLE_PROTOBUF_CHECKOUT} /src/protoc" }
4950
5051function usage() {
5152 cat >&2 << EOF
@@ -296,7 +297,7 @@ for comparison in "${comparisons[@]}"; do
296297 echo " ==== Building/running C++ harness ===================="
297298 echo
298299
299- protoc --cpp_out=" $script_dir " " $gen_message_path "
300+ ${PROTOC} --cpp_out=" $script_dir " " $gen_message_path "
300301
301302 harness_cpp=" $script_dir /_generated/harness_cpp"
302303 run_cpp_harness " $harness_cpp "
@@ -319,7 +320,7 @@ for comparison in "${comparisons[@]}"; do
319320 mkdir " $tmp_checkout /Performance/_generated"
320321
321322 build_swift_packages " $tmp_checkout " " ForRev"
322- protoc --plugin=" $tmp_checkout /.build/release/protoc-gen-swiftForRev" \
323+ ${PROTOC} --plugin=" $tmp_checkout /.build/release/protoc-gen-swiftForRev" \
323324 --swiftForRev_out=FileNaming=DropPath:" $tmp_checkout /Performance/_generated" \
324325 " $gen_message_path "
325326
@@ -340,7 +341,7 @@ echo "==== Building/running Swift harness (working tree) ===================="
340341echo
341342
342343build_swift_packages " $script_dir /.." " ForWorkTree"
343- protoc --plugin=" $script_dir /../.build/release/protoc-gen-swiftForWorkTree" \
344+ ${PROTOC} --plugin=" $script_dir /../.build/release/protoc-gen-swiftForWorkTree" \
344345 --swiftForWorkTree_out=FileNaming=DropPath:" $script_dir /_generated" \
345346 --cpp_out=" $script_dir " \
346347 " $gen_message_path "
0 commit comments