-
Notifications
You must be signed in to change notification settings - Fork 393
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
fix rustdoc: omit link flags for rustdoc #2467
fix rustdoc: omit link flags for rustdoc #2467
Conversation
In our project, rust_doc fails because it is generating -l arguments to rustdoc, and rustdoc does not support -l arguments. In my understanding, these arguments are only relevant for calling the linker at some point, and it won't be called for rustdoc anyway.
There are some CI failures that suggest that for some actions in rustdoc mode at least, the linking step or something in the Also could you add an example integration test about the failure you're seeing. |
This reverts commit c830fcc.
I couldn't find a build configuration with nonempty `cc_toolchain.dynamic_runtime_lib` or `cc_toolchain.static_runtime_lib`, so the new filter there is not covered by unit tests.
Thanks for looking at this! I adapted the code correspondingly, to omit Most of the new patch is just threading variables through. But we now omit
I made regression tests for the first two. But I didn't know how to for the third one; common platforms seem to have empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you!
In our project, rust_doc fails because it is generating `-l` arguments to rustdoc, and rustdoc does not support `-l` arguments. In my understanding, these arguments are only relevant for calling the linker at some point, and it won't be called for rustdoc anyway. With this PR, our project can build with rust_doc. --------- Co-authored-by: Krasimir Georgiev <krasimir@google.com>
In our project, rust_doc fails because it is generating
-l
arguments torustdoc, and rustdoc does not support
-l
arguments.In my understanding, these arguments are only relevant for calling the
linker at some point, and it won't be called for rustdoc anyway.
With this PR, our project can build with rust_doc.