-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
bootstrap: Support --
as an alternative to --args
and --test-args
#107375
Comments
@rustbot claim |
Looking at the current setup for argument parsing, it appears that getopts::Options struct doesn't have a state engine based parser, so it wont be able to parse -- as a state changing flag. I'm thinking probably parse and translate the args in python then just pass it on to the bootstrap executable, (unless someone here has a better idea). |
@Teapot4195 let's not put any logic in python if we can help it, it's going away soon: #94829. I think it would be ok to switch to |
Ah, I was thinking something like getting rid of the python script was going to happen someday. |
I'm out of town for the rest of the week so if anyone would like to take this issue while I'm away, go for it. |
Right now, x.py is pretty inconsistent with cargo's CLI. To pass arguments to compiletest, you use
--test-args
; to pass arguments toexpand-yaml-anchors
you use--args
; to pass arguments to cargo you use CARGOFLAGS. I would like to unify these with the same syntax as cargo:x test ui -- --force-rerun --ignored
would behave the same asx test ui --test-args --force-rerun --test-args --ignored
todayx run miri -- run --print=sysroot
would behave the same asx run miri --args run --args --print=sysroot
x fix -- --fix-broken
would behave the same asCARGOFLAGS=--fix-broken x fix
today, except that it would only pass it to cargo commands invoked by bootstrap, not when building bootstrap itself (avoiding the "argument --fix-broken not expected" error you'd get today).The text was updated successfully, but these errors were encountered: