Skip to content

[windows] add PDB files to install target#895

Draft
charles-zablit wants to merge 1 commit into
apple:mainfrom
charles-zablit:cz/windows/symbolfiles
Draft

[windows] add PDB files to install target#895
charles-zablit wants to merge 1 commit into
apple:mainfrom
charles-zablit:cz/windows/symbolfiles

Conversation

@charles-zablit
Copy link
Copy Markdown

This is part of swiftlang/swift#88869.

@rauhul rauhul requested a review from compnerd May 6, 2026 15:44
Copy link
Copy Markdown
Collaborator

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  install(FILES $<TARGET_PDB_FILE:${module}> 
    DESTINATION ${CMAKE_INSTALL_BINDIR}
    OPTIONAL)

@charles-zablit
Copy link
Copy Markdown
Author

  install(FILES $<TARGET_PDB_FILE:${module}> 
    DESTINATION ${CMAKE_INSTALL_BINDIR}
    OPTIONAL)

Is there a specific reason for doing it this way instead of the other way around?

@compnerd
Copy link
Copy Markdown
Collaborator

compnerd commented May 6, 2026

  install(FILES $<TARGET_PDB_FILE:${module}> 
    DESTINATION ${CMAKE_INSTALL_BINDIR}
    OPTIONAL)

Is there a specific reason for doing it this way instead of the other way around?

Yes, this makes the code easier to read, this allows CMake to track the dependency properly, and it doesn't require you to know where the PDB is emitted in practice. This is the canonical way that CMake recommends.

@charles-zablit
Copy link
Copy Markdown
Author

I tried this and it fails at configure time:

CMake Error:
  Error evaluating generator expression:

    $<TARGET_PDB_FILE:ArgumentParser>

  TARGET_PDB_FILE is not supported by the target linker.

It looks like TARGET_PDB_FILE is not available for Swift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants