Do not pass archive files containing bitcode files to the MSVC Linker.
If /msvclto is specified, we compile bitcode files and pass it to the MSVC linker, stripping all bitcode files. We haven't stripped archive files, because I was thinking that the MSVC linker wouldn't touch files in archive files. When we pass an object file to link.exe, all symbols have been resolved already, so link.exe shoulnd't need any of the files in archives. It turns out that even though link.exe doesn't need to do that, it seems to try to read each file in all archives. And if there's a non- COFF file in an archive, it exists with an error message. So we need to remove archives from the command line too. llvm-svn: 297191
Loading
Please register or sign in to comment