Skip to content

Commit 55021a8

Browse files
committed
Add a benchmark cmake flag SWIFT_RUNTIME_ENABLE_LEAK_CHECKER.
This is necessary to build standalone benchmarks with leak checking enabled. This is useful if you want to debug an internal benchmark failure using a public swift.
1 parent 6dc41d8 commit 55021a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

benchmark/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ endif()
229229
set(SWIFT_BENCHMARK_EXTRA_FLAGS "" CACHE STRING
230230
"Extra options to pass to swiftc when building the benchmarks")
231231

232+
if (SWIFT_BENCHMARK_BUILT_STANDALONE)
233+
# This option's value must match the value of the same option used when
234+
# building the swift runtime.
235+
option(SWIFT_RUNTIME_ENABLE_LEAK_CHECKER
236+
"Should the runtime be built with support for non-thread-safe leak detecting entrypoints"
237+
FALSE)
238+
endif()
239+
232240
set(SWIFT_BENCHMARK_NUM_O_ITERATIONS "" CACHE STRING
233241
"Number of iterations to perform when running -O benchmarks via cmake")
234242
set(SWIFT_BENCHMARK_NUM_ONONE_ITERATIONS "" CACHE STRING

0 commit comments

Comments
 (0)