Skip to content

Commit bd63b21

Browse files
authored
Merge pull request swiftlang#77467 from etcwilde/ewilde/stdlib-rebuild-function-counters
[CMake] Add option to enable runtime function counters
2 parents 4f8b5c1 + ac57683 commit bd63b21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Runtimes/Core/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ defaulted_option(SwiftCore_ENABLE_TYPE_PRINTING "Enable printing type names")
6363
defaulted_option(SwiftCore_ENABLE_VECTOR_TYPES "Enable vector support")
6464
defaulted_option(SwiftCore_ENABLE_REFLECTION "Enable runtime support for mirrors and reflection support")
6565
defaulted_option(SwiftCore_ENABLE_COMMANDLINE_SUPPORT "Enable command line argument support")
66+
defaulted_option(SwiftCore_ENABLE_RUNTIME_FUNCTION_COUNTERS "Enable runtime function counter support")
6667

6768
defaulted_option(SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support")
6869
set(SwiftCore_BACKTRACER_PATH ${SwiftCore_BACKTRACER_PATH_default} CACHE STRING "Set a fixed path to the Swift backtracer")
@@ -77,6 +78,7 @@ add_compile_definitions(
7778
$<$<BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION}>:-DSWIFT_LIBRARY_EVOLUTION>
7879
$<$<BOOL:${SwiftCore_ENABLE_CRASH_REPORTER_CLIENT}>:-DSWIFT_HAVE_CRASHREPORTERCLIENT>
7980
$<$<BOOL:${SwiftCore_ENABLE_REFLECTION}>:-DSWIFT_ENABLE_REFLECTION>
81+
$<$<BOOL:${SwiftCore_ENABLE_RUNTIME_FUNCTION_COUNTERS}>:-DSWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS>
8082
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER=$<BOOL:${SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER}>>
8183
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=$<BOOL:${SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS}>>)
8284

0 commit comments

Comments
 (0)