Files
CMake/Tests/RunCMake/Swift/TargetPDBFileDwarf.cmake
Saleem Abdulrasool 404f6bac3c Swift: support PDB emission with Swift
Swift supports CodeView/PDB for Windows (with active development ongoing
to make it the default). It is currently usable but does not have the
same fidelity as DWARF, but can be sufficient for many use cases. The
user is able to control this via flags. Wire up the necessary support to
allow `TARGET_PDB_FILE` to be used with Swift/Swift-only targets.
2026-05-16 09:05:46 -04:00

13 lines
370 B
CMake

cmake_policy(SET CMP0157 NEW)
enable_language(Swift)
add_executable(SwiftPDBDwarf E.swift)
set_property(TARGET SwiftPDBDwarf PROPERTY LINKER_TYPE LLD)
target_compile_options(SwiftPDBDwarf PRIVATE -g -debug-info-format=dwarf)
target_link_options(SwiftPDBDwarf PRIVATE LINKER:-debug:dwarf)
install(FILES "$<TARGET_PDB_FILE:SwiftPDBDwarf>"
DESTINATION bin
OPTIONAL)