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 |
krasimirgg
left a comment
There was a problem hiding this comment.
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
-larguments torustdoc, and rustdoc does not support
-larguments.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.