File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ defaulted_option(SwiftCore_ENABLE_CONCURRENCY "Enable Concurrency runtime suppor
110110defaulted_option(SwiftCore_ENABLE_REMOTE_MIRROR "Enable RemoteMirror runtime support" )
111111defaulted_option(SwiftCore_ENABLE_DIRECT_RETAIN_RELEASE "Use direct retain release in the runtime/stdlib" )
112112defaulted_set(SwiftCore_CONCURRENCY_GLOBAL_EXECUTOR STRING "Default Concurrency global executor implementation" )
113- option (SwiftCore_ENABLE_STDLIB_TRACING "Enable tracing in the runtime. Assumes the precense of os_log(3) and the os_signpost(3) API." OFF )
113+ option (SwiftCore_ENABLE_STDLIB_TRACING "Enable tracing in the runtime. Requires os_log(3) and the os_signpost(3) API." OFF )
114114option (SwiftCore_ENABLE_COMMANDLINE_SUPPORT "Enable command line argument support" ON )
115115option (SwiftCore_ENABLE_UNICODE_DATA "Include unicode data in Swift runtimes" ON )
116116option (SwiftCore_ENABLE_SHORT_MANGLING_LOOKUPS "Build with fast-path context descriptor lookups based on well-known short manglings." ON )
Original file line number Diff line number Diff line change @@ -72,6 +72,14 @@ if(SwiftCore_ENABLE_FILESYSTEM_SUPPORT AND (NOT SwiftCore_ARCH_SUBDIR OR NOT Swi
7272 message (SEND_ERROR "Filesystem support requires setting `SwiftCore_ARCH_SUBDIR` and `SwiftCore_PLATFORM_SUBDIR`" )
7373endif ()
7474
75+ if (SwiftCore_ENABLE_STDLIB_TRACING)
76+ check_symbol_exists("os_signpost_interval_begin" "os/signpost.h" SwiftCore_HAS_OS_SIGNPOST)
77+ check_symbol_exists("os_log" "os/log.h" SwiftCore_HAS_OS_LOG)
78+ if (NOT SwiftCore_HAS_OS_LOG OR NOT SwiftCore_HAS_OS_SIGNPOST)
79+ message (SEND_ERROR "Tracing requires 'os_signpost' and 'os_log' APIs" )
80+ endif ()
81+ endif ()
82+
7583# TODO: Probably worth considering putting half of these in a RuntimeConfig.h.in
7684# file rather than pushing them through macro flags.
7785target_compile_definitions (swiftRuntime
You can’t perform that action at this time.
0 commit comments