File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,10 @@ option(SWIFT_BENCHMARK_GENERATE_OPT_VIEW
248
248
set (SWIFT_BENCHMARK_OPT_VIEWER "" CACHE FILEPATH
249
249
"Path to opt-viewer" )
250
250
251
+ option (SWIFT_BENCHMARK_GENERATE_DEBUG_INFO
252
+ "Produce debug info for benchmarks"
253
+ TRUE )
254
+
251
255
if (SWIFT_BENCHMARK_OPT_VIEWER )
252
256
# If the path to the opt-viewer was specified manually and we have no access
253
257
# to the LLVM tree, assume we have the modules for the opt-viewer installed.
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ The following build options are available:
67
67
* Enable this option to link the benchmark binaries against the target
68
68
machine's Swift standard library and runtime installed with the OS.
69
69
(default: OFF)
70
+ * ` -DSWIFT_BENCHMARK_GENERATE_DEBUG_INFO `
71
+ * Enable this option to compile benchmark binaries with debug info.
72
+ (default: ON)
70
73
71
74
The following build targets are available:
72
75
Original file line number Diff line number Diff line change @@ -355,6 +355,10 @@ function (swift_benchmark_compile_archopts)
355
355
"-target" "${target} "
356
356
"-${BENCH_COMPILE_ARCHOPTS_OPT} " ${PAGE_ALIGNMENT_OPTION} )
357
357
358
+ if (SWIFT_BENCHMARK_GENERATE_DEBUG_INFO )
359
+ list (APPEND common_options "-g" )
360
+ endif ()
361
+
358
362
if (is_darwin )
359
363
list (APPEND common_options
360
364
"-I" "${srcdir} /utils/ObjectiveCTests"
@@ -384,6 +388,10 @@ function (swift_benchmark_compile_archopts)
384
388
"-target" "${target} "
385
389
"-${driver_opt} " )
386
390
391
+ if (SWIFT_BENCHMARK_GENERATE_DEBUG_INFO )
392
+ list (APPEND common_options_driver "-g" )
393
+ endif ()
394
+
387
395
if (is_darwin )
388
396
list (APPEND common_options_driver
389
397
"-sdk" "${sdk} "
You can’t perform that action at this time.
0 commit comments