diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2023-01-18 22:23:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-16 21:10:05 (GMT) |
commit | 9693191582b3bd0ccff26c60869299f93c8aae0d (patch) | |
tree | 81afa23cbcc598291b262abebaceed5e3477ab5a /Modules/Platform/Windows-Apple-Swift.cmake | |
parent | 51c79170720abc16981381c924e2c50b5ed45ecf (diff) | |
download | CMake-9693191582b3bd0ccff26c60869299f93c8aae0d.zip CMake-9693191582b3bd0ccff26c60869299f93c8aae0d.tar.gz CMake-9693191582b3bd0ccff26c60869299f93c8aae0d.tar.bz2 |
Swift: Emit debug information on Windows
When building on Windows, pass `-debug` to the linker to emit the PDB
(or `-debug:dwarf` when building with lld and using DWARF). We would
previously not do this which meant that we never emitted the debug
information making debugging more difficult.
Fixes: #24423
Diffstat (limited to 'Modules/Platform/Windows-Apple-Swift.cmake')
-rw-r--r-- | Modules/Platform/Windows-Apple-Swift.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
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") |