cc-rs
                                
                                
                                
                                    cc-rs copied to clipboard
                            
                            
                            
                        Environment variables on windows required double backslash
When cross-compiling from windows to Android, I found I needed to add environment variables for the CC and AR (in addition to the config in .cargo/config) in order to get this crate to work. E.g. set CC_armv7-linux-androideabi=C:\\path\\to\\ndk\\21.4.7075529\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\armv7a-linux-androideabi21-clang.cmd. This is all fine (though took embarrassingly long to figure out).
The problem is this requires double-backslashes, whereas normally environment variables on windows which are paths use single-backslashes (e.g. JAVA_HOME, LIBCLANG_PATH etc. all look like C:\path\to\folder). Obviously this is low priority, but if there's an easy fix there it could be worth it for consistency...
Weird, I just ran a build of the cc-test test crate in this repo with AR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\lib.exe and it worked
Could you check again, against the master branch of cc-rs? Maybe it's been fixed already
I don't think that this is a bug in cc but rather something else along-the-line. Most likely there's some shell script somewhere using CC or something like that which is behaving badly.
This is a year old and it isn't clear how to reproduce, so I'll close this for now. If anyone has a reproducible example then feel free to create a new issue or comment here.