For non-MSVC, separate flags/options from the input file. (#513)#514
For non-MSVC, separate flags/options from the input file. (#513)#514m-ou-se merged 1 commit intorust-lang:mainfrom
Conversation
|
@alexcrichton two relevant questions/things to check:
|
|
Nah yeah I agree that conservatively passing It may be pretty difficult to add a test for this since I don't think any of the tests are in "mock clang-cl mode". For now I think it's ok to skip the test. Unfortunately most functionality in this crate doesn't have a test because it's typically quite difficult to set up all the native toolchains and various environments. |
…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.
|
I will have to patch |
|
Ok sounds good to me! Wanna let me know if this works there and if so I can merge and publish? |
|
This PR appears to break in rustc's CI. See details. Perhaps @ncalexan or @roblabla would be willing to investigate this? In the meantime this may need to be reverted until there's a fix. |
|
So it seems like even if A quick fix would be to add an |
|
Got a fix over at #747 |
|
Fix released in https://github.com/rust-lang/cc-rs/releases/tag/1.0.76 |
|
FYI, this broke building with sccache, because sccache doesn't handle the "--" properly. |
This avoids a
clang-clissue common when cross-compiling from macOSto Windows: the
-Wslash-u-filenamewhere a/Users/...path isinterpreted as the
cl.exeflag/U.In general it's somewhere between harmless and good form to separate
flags/options from input files, so
--is used for all compilers saveMSVC.
There are no existing tests mocking out
clang-cland surface effortsdidn't succeed, so that will have to wait for follow-up.