Skip to content

Commit 522221e

Browse files
committed
Obey SWIFT_EXEC and OTHER_SWIFT_FLAGS environment variables
1 parent e53875f commit 522221e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Performance/runners/swift.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,18 @@ function run_swift_harness() {
3939
# TODO: Make the dylib a product again in the package manifest and just use
4040
# that.
4141
echo "Building SwiftProtobuf dynamic library..."
42-
xcrun -sdk macosx swiftc -emit-library -emit-module -O -wmo \
42+
${SWIFT_EXEC:-swiftc} -emit-library -emit-module -O -wmo \
4343
-o "$perf_dir/_generated/libSwiftProtobuf.dylib" \
44+
${OTHER_SWIFT_FLAGS:-} \
4445
"$perf_dir/../Sources/SwiftProtobuf/"*.swift
4546

4647
echo "Building Swift test harness..."
47-
time ( xcrun -sdk macosx swiftc -O \
48+
time ( ${SWIFT_EXEC:-swiftc} -O \
4849
-o "$harness" \
4950
-I "$perf_dir/_generated" \
5051
-L "$perf_dir/_generated" \
5152
-lSwiftProtobuf \
53+
${OTHER_SWIFT_FLAGS:-} \
5254
"$gen_harness_path" \
5355
"$perf_dir/Harness.swift" \
5456
"$perf_dir/_generated/message.pb.swift" \

0 commit comments

Comments
 (0)