diff options
author | Brad King <brad.king@kitware.com> | 2023-02-17 13:53:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-02-17 13:54:03 (GMT) |
commit | 0089a32c2c83685a2ddac1705bb38d3cee6a5a7b (patch) | |
tree | 41af7164f149e1b41736dbc9802033c162f1c148 /Modules | |
parent | e4de6069834d3e7fcb39e8eec6fafcc4190dbf6d (diff) | |
parent | 9693191582b3bd0ccff26c60869299f93c8aae0d (diff) | |
download | CMake-0089a32c2c83685a2ddac1705bb38d3cee6a5a7b.zip CMake-0089a32c2c83685a2ddac1705bb38d3cee6a5a7b.tar.gz CMake-0089a32c2c83685a2ddac1705bb38d3cee6a5a7b.tar.bz2 |
Merge topic 'swift-debug-info'
9693191582 Swift: Emit debug information on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8090
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeSwiftInformation.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/Windows-Apple-Swift.cmake | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index a75dfce..d27aa3f 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -72,9 +72,9 @@ if(CMAKE_GENERATOR STREQUAL "Xcode") # these options here will have no effect when compiling with the built-in driver, # and will explode violently, leaving build products in the source directory, when # using the old swift driver. - set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g") + set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g ${CMAKE_Swift_FLAGS_DEBUG_LINKER_FLAGS}") set(CMAKE_Swift_FLAGS_RELEASE_INIT "-O") - set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g") + set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g ${CMAKE_Swift_FLAGS_RELWITHDEBINFO_LINKER_FLAGS}") set(CMAKE_Swift_FLAGS_MINSIZEREL_INIT "-Osize") else() set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g -incremental") diff --git a/Modules/Platform/Windows-Apple-Swift.cmake b/Modules/Platform/Windows-Apple-Swift.cmake index 1177755..3f754fd 100644 --- a/Modules/Platform/Windows-Apple-Swift.cmake +++ b/Modules/Platform/Windows-Apple-Swift.cmake @@ -1 +1,3 @@ set(CMAKE_Swift_IMPLIB_LINKER_FLAGS "-Xlinker -implib:<TARGET_IMPLIB>") +set(CMAKE_Swift_FLAGS_DEBUG_LINKER_FLAGS "-Xlinker -debug") +set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_LINKER_FLAGS "-Xlinker -debug") |