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

Have --dep-info generate gn-compatible dependency files #5162

Closed
rtsuk opened this issue Mar 10, 2018 · 2 comments · Fixed by #5171
Closed

Have --dep-info generate gn-compatible dependency files #5162

rtsuk opened this issue Mar 10, 2018 · 2 comments · Fixed by #5171

Comments

@rtsuk
Copy link

rtsuk commented Mar 10, 2018

In #3557 @raphlinus added dependency file generation to rustc. This issue is about modifying that generation so that it produces gn-compatible dependency files.

gn requires, in dependency files that it is asked to consume, that "all paths must be relative to the root build directory." Empirically it appears that this is actually only required of the target paths.

This issue is mostly implemented already, as the code to generate the dependency file already has an option to make target paths relative. I tested it by hard-coding a value and it makes dependency files that gn is happy to consume. So all that's required is to provide some way to pass this value to output_depinfo().

What would be the most correct way to pass such information? Something in cargo config seems easiest.

@alexcrichton
Copy link
Member

Sounds like a fine idea! I'd be down for something like:

[build]
dep-info-format = 'gn'

or something like that

@rtsuk
Copy link
Author

rtsuk commented Mar 12, 2018

Great! I'll get started on this.

bors added a commit that referenced this issue Mar 14, 2018
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 a pull request may close this issue.

2 participants