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

Rustc command line parser does not accept absolute Windows paths after -L #16348

Closed
vadimcn opened this issue Aug 8, 2014 · 1 comment · Fixed by #16512
Closed

Rustc command line parser does not accept absolute Windows paths after -L #16348

vadimcn opened this issue Aug 8, 2014 · 1 comment · Fixed by #16512
Labels
O-windows Operating system: Windows

Comments

@vadimcn
Copy link
Contributor

vadimcn commented Aug 8, 2014

rustc foo.rs -LC:\some\directory
error: unknown codegen option: `:\some\directory`

This works, though: rustc foo.rs -L C:\some\directory

@huonw huonw added the A-windows label Aug 8, 2014
vadimcn added a commit to vadimcn/rust that referenced this issue Aug 12, 2014
@wickerwaka
Copy link

This is not windows specific. Since '-C' is a valid option, libgetopts is not treating 'C' it as a the start of the value being specified for the '-L' option. I'm not sure if this is expected or desired functionality. IMO if an option has a mandatory or optional argument then anything after it should be treated as such.

wickerwaka pushed a commit to wickerwaka/rust that referenced this issue Aug 15, 2014
As soon as an option is found that takes an argument, consume the rest
of the string and store it into i_arg. Previously this would only happen
if the character after the option was not a recognized option.

Addresses issue rust-lang#16348
bors added a commit that referenced this issue Aug 22, 2014
I don't know if anything else was relying on the old behavior, this seems more correct.

Fixes #16348

If '-F' is allowed to have an optional argument, with the previous version '-FF' would be translated to '-F -F'. In this new version '-FF' translates to '-F' with argument 'F'
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 15, 2024
fix: Fix nested includes resolving from the wrong base file

Fixes rust-lang/rust-analyzer#16109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants