Files
CMake/Modules/Platform/Windows-Apple-Swift.cmake
Saleem Abdulrasool 9693191582 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
2023-02-16 16:10:05 -05:00

4 lines
201 B
CMake

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")