Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle debug info packages separately when using cc_common.link #3257

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yuzhy8701
Copy link
Contributor

@yuzhy8701 yuzhy8701 commented Feb 11, 2025

Debug info packages (dSYM, pdb) are created by rustc only if you link with rustc. When linking with cc_common, they should be handled by the cc toolchain or a custom aspect. Declaring them prematurely can cause conflicts.

This PR removes the dsym_folder declaration if cc_common.link is being used - since cc_common doesn't support dsym generation yet. It postpones the declaration of pdb_file after checking with the cpp features first.

@yuzhy8701 yuzhy8701 marked this pull request as draft February 12, 2025 18:45
Debug info packages (`dSYM`, `pdb`) are created by `rustc` only if you link with `rustc`. When linking with `cc_common`, they should be handled by the cc toolchain or an custom aspect. Declaring them prematurely can cause conflicts.
@yuzhy8701 yuzhy8701 changed the title Do not declare debug info packages when using cc_common.link Handle debug info packages separately when using cc_common.link Feb 12, 2025
….link

This replicates the behavior of the `cc_binary` rule.
@yuzhy8701 yuzhy8701 marked this pull request as ready for review February 12, 2025 22:25
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.

1 participant