corert icon indicating copy to clipboard operation
corert copied to clipboard

Fix how we detect where link.exe is

Open MichalStrehovsky opened this issue 5 years ago • 1 comments

Seems like when the Visual C++ workload is not installed in VS, we get a useless build error:

         "C:\Users\[redacted]\.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-28504-01\build\findvcvarsall.bat" amd64
         INFO: Could not find files for the given pattern(s).
         C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64;
       Done executing task "Exec".
     1>C:\Users\[redacted]\.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-28504-01\build\Microsoft.NETCore.Native.Windows.props(98,43): error MSB4184: The expression ""System.String[]".GetValue(1)" cannot be evaluated. Index was outside the bounds of the array.

MichalStrehovsky avatar Apr 02 '20 08:04 MichalStrehovsky

Hello,

Could LLVM and MinGW be used from https://github.com/mstorsjo/llvm-mingw for example to not need VS and the Windows SDK installed?

Ideally, only needed things the LLVM lld linker and the .lib files, without having to ship a whole MSVC toolchain.

LLVM-MinGW would allow to cross-compile builds to Windows from Linux or macOS too in an easy to set up way.

I'd also try the LLD link.exe compatible frontend...

Thanks,

woachk avatar Apr 15 '20 13:04 woachk