Skip to content

Commit 0f984da

Browse files
cburrowsthomasvl
authored andcommitted
Configure the protoc binary to the protobuf checkout
1 parent f33185a commit 0f984da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Performance/perf_runner.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ readonly script_dir="."
4646
# Change this if your checkout of github.com/protocolbuffers/protobuf is in a
4747
# different location.
4848
readonly GOOGLE_PROTOBUF_CHECKOUT=${GOOGLE_PROTOBUF_CHECKOUT:-"$script_dir/../../protobuf"}
49+
readonly PROTOC=${PROTOC:-"${GOOGLE_PROTOBUF_CHECKOUT}/src/protoc"}
4950

5051
function 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) ===================="
340341
echo
341342

342343
build_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

Comments
 (0)