From e0a42827250b70b8b1cb37334d0747f812337352 Mon Sep 17 00:00:00 2001 From: justiceadams Date: Wed, 4 Dec 2024 13:14:32 -0800 Subject: [PATCH 1/2] move tracing flags to the runtime cmake definition --- Runtimes/Core/CMakeLists.txt | 1 + Runtimes/Core/runtime/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Runtimes/Core/CMakeLists.txt b/Runtimes/Core/CMakeLists.txt index abf70e3bc683a..fa53340f0fe0d 100644 --- a/Runtimes/Core/CMakeLists.txt +++ b/Runtimes/Core/CMakeLists.txt @@ -89,6 +89,7 @@ defaulted_option(SwiftCore_ENABLE_STATIC_PRINT "Disable full print") defaulted_option(SwiftCore_ENABLE_UNICODE_DATA "Embed Unicode info in Swift Core") defaulted_option(SwiftCore_ENABLE_COMPACT_ABSOLUTE_FUNCTION_POINTERS "Resolve absolute function pointer as identity") defaulted_option(SwiftCore_ENABLE_BACKDEPLOYMENT_SUPPORT "Add symbols for runtime backdeployment") +defaulted_option(SwiftCore_ENABLE_STDLIB_TRACING "Enable tracing in the runtime. Assumes the presence of os_log(3) and the os_signpost(3) API.") defaulted_option(SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support") defaulted_set(SwiftCore_BACKTRACER_PATH STRING "Set a fixed path to the Swift backtracer") diff --git a/Runtimes/Core/runtime/CMakeLists.txt b/Runtimes/Core/runtime/CMakeLists.txt index d6b317c818703..b97525d772bf3 100644 --- a/Runtimes/Core/runtime/CMakeLists.txt +++ b/Runtimes/Core/runtime/CMakeLists.txt @@ -82,7 +82,9 @@ target_compile_definitions(swiftRuntime $<$:-DSWIFT_ENABLE_BACKTRACING> $<$:-DSWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE> $<$:-DSWIFT_STDLIB_HAS_MALLOC_TYPE> - $<$:-DSWIFT_RUNTIME_FIXED_BACKTRACER_PATH="${SwiftCore_BACKTRACER_PATH}">) + $<$:-DSWIFT_RUNTIME_FIXED_BACKTRACER_PATH="${SwiftCore_BACKTRACER_PATH}"> + $<$:-DSWIFT_STDLIB_TRACING> + $<$:-DSWIFT_STDLIB_CONCURRENCY_TRACING>) target_include_directories(swiftRuntime PRIVATE "${PROJECT_BINARY_DIR}/include" From 66fc1cea001b6acc8319a859b33d3296a6366c1d Mon Sep 17 00:00:00 2001 From: justiceadams Date: Wed, 4 Dec 2024 14:25:19 -0800 Subject: [PATCH 2/2] remove -DSWIFT_STDLIB_CONCURRENCY_TRACING --- Runtimes/Core/runtime/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Runtimes/Core/runtime/CMakeLists.txt b/Runtimes/Core/runtime/CMakeLists.txt index b97525d772bf3..f16ad9d066786 100644 --- a/Runtimes/Core/runtime/CMakeLists.txt +++ b/Runtimes/Core/runtime/CMakeLists.txt @@ -83,8 +83,7 @@ target_compile_definitions(swiftRuntime $<$:-DSWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE> $<$:-DSWIFT_STDLIB_HAS_MALLOC_TYPE> $<$:-DSWIFT_RUNTIME_FIXED_BACKTRACER_PATH="${SwiftCore_BACKTRACER_PATH}"> - $<$:-DSWIFT_STDLIB_TRACING> - $<$:-DSWIFT_STDLIB_CONCURRENCY_TRACING>) + $<$:-DSWIFT_STDLIB_TRACING>) target_include_directories(swiftRuntime PRIVATE "${PROJECT_BINARY_DIR}/include"