Ensure that the correct VC++ toolset is selected in all build environments#104763
Ensure that the correct VC++ toolset is selected in all build environments#104763eiriktsarpalis merged 10 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @hoyosjs |
Co-authored-by: Jan Kotas <[email protected]>
MichalStrehovsky
left a comment
There was a problem hiding this comment.
Looks great, thanks. I think this is also fixing #76516!
|
Same change in |
Where is it being used? |
|
|
Are you suggesting that the script is being used by the product? (rather than building the product?) |
This is tracked in #76079. If you'd like to volunteer your time for that one too, we'd need to make the change and then run this on a arm64 machine to validate (I assume both build.cmd will build arm64 flavors): It should be an easy fix, we've just not done it because Microsoft doesn't want to spend money on giving me an ARM64 machine and I will not spend my mental health on using an ARM64 machine on a different continent interactively. It doesn't have to be part of this PR, it's not an infra change, it's a product change. |
|
I have win-arm64 VM running on osx-arm64, I can take a look based on @eiriktsarpalis changes (unless Eirik beats me to it 😄). |
|
I expect some of the assumptions we're making for the build (e.g. #104763 (comment)) might be different in the context of the product, so we should keep the changes in separate PRs. @am11 feel free to have a go at this. |
|
@am11 what certainly seems to be the case is that we should be adding provision for 32-bit machines that this PR is skipping. |
|
BuildIntegration script is used by both, product build as well as shipped in ILCompiler nuget package for windows. Quick testing suggests this should do the trick: am11@33ce9b3. |
I do not think we need to bother with 32-bit Windows x86 machines. Those machines do not really exist anymore as dev machines and Visual Studio (that is a pre-req for naor publish) requires 64-bit. I would keep it simple and always use 64-bit tools, same as what we do in the repo build. |
I think |
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
This reverts commit a1b95c1.
|
Can you also include a fix to runtime/eng/native/configurecompiler.cmake Line 999 in f9eda07 It needs to use $ENV{VCToolsInstallDir}\\bin\\Hostarm64\\arm64\\armasm64.exe instead of $ENV{VCToolsInstallDir}\\bin\\HostX86\\arm64\\armasm64.exe.And CLR_CMAKE_HOST_WIN32+CLR_CMAKE_HOST_ARCH_ARM isn't a thing now so the branch can be removed: runtime/eng/native/configurecompiler.cmake Lines 979 to 995 in f9eda07 |
This reverts commit 1eeadb3.
|
@hez2010 is it a question of simply updating the path or do we need to condition this on the build architecture? |
Simply updating the path should be okay. It has already been guarded by both |
|
That would still be entered if you're cross compiling to arm64 on x64 though, right? |
|
I updated the assembler logic as well, but it turns out that some branching is required for cross-compilation on x64 to keep working. |
Follow-up on #104695, this PR tries to set the correct build architectures for all configurations. The changes result in cross-compilation failing in the
gen-buildsys.cmdstage, figured I'd post the PR for group troubleshooting.Fix #104674. Fix #76516.