Skip to content

Add rustc_flags to rust_doc_test #2655

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

Open
rdelfin opened this issue May 15, 2024 · 1 comment
Open

Add rustc_flags to rust_doc_test #2655

rdelfin opened this issue May 15, 2024 · 1 comment

Comments

@rdelfin
Copy link

rdelfin commented May 15, 2024

Due to a quirk in our toolchain, we need to pass in -Crelocation-model=static to a set of executable binaries when building them to let them work (see #118 for more details). As a result, when running a rust_doc_test, this flag needs to be used during compilation. However, there's currently no way of setting this on those targets. The only work around is to skip execution of the test with the no_run directive, which is not ideal

@illicitonion
Copy link
Collaborator

AFAIK rust_doc_test takes a pointer to an existing target, and all of the targets you can point at allow you to specify rustc_flags - are you setting on the other target, and is it getting dropped or something?

Can you put together a small example to show what you're trying to do?

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

No branches or pull requests

2 participants