-
Notifications
You must be signed in to change notification settings - Fork 463
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
Use --
to separate flags and options from input filenames
#513
Comments
Thanks for the report! This should be relatively easy to fix I think since we should already know whether the type of the compiler is clang/gnu/etc. Given that we could just arrange for the filename to always be at the end and then, for clang-cl, always use |
ncalexan
added a commit
to ncalexan/cc-rs
that referenced
this issue
Jun 9, 2020
) This avoids a `clang-cl` issue common when cross-compiling from macOS to Windows: the `-Wslash-u-filename` where a `/Users/...` path is interpreted as the `cl.exe` flag `/U`. In general it's somewhere between harmless and good form to separate flags/options from input files, so `--` is used for all compilers save MSVC. There are no existing tests mocking out `clang-cl` and surface efforts didn't succeed, so that will have to wait for follow-up.
ncalexan
added a commit
to ncalexan/cc-rs
that referenced
this issue
Jun 10, 2020
…h-u-filename`. (rust-lang#513) This avoids a `clang-cl` issue common when cross-compiling from macOS to Windows: the `-Wslash-u-filename` where a `/Users/...` path is interpreted as the `cl.exe` flag `/U`. Not all compilers recognize `--` so this is limited to `clang-cl`. There are no existing tests mocking out `clang-cl` and surface efforts didn't succeed, so that will have to wait for follow-up.
ChrisDenton
added a commit
that referenced
this issue
Nov 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm in the unusual position of trying to cross-compile from macOS to Windows with
clang-cl
(building Firefox, but that's not really relevant). I'm running into the[-Wslash-u-filename]
warning, like so:What's needed in these situations is to insert
--
before the input filename. Given thatcc-rs
must already be normalizing itsBuilder
outputs, this seems straight-forward enough, but it's technically possible that supported C/C++ compilers wouldn't accept--
.Would the project take a patch?
The text was updated successfully, but these errors were encountered: