Make build.ps1 default to the OS architecture#104792
Make build.ps1 default to the OS architecture#104792eiriktsarpalis merged 2 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
|
cc @vcsjones |
There was a problem hiding this comment.
LGTM
Defaulting to the OS architecture makes windows builds consistent with UNIX builds.
Nit: I do not think that it is the case. If you run build in emulated environment (e.g. in x64 emulated shell on Apple Silicon), the build is going to default to the emulated architecture. uname -a that we use to detect the default architecture will return the emulated architecture, not the machine architecture: https://apple.stackexchange.com/questions/420452/running-uname-m-gives-x86-64-on-m1-mac-mini . I do not think there is anything to fix. The UNIX emulated environment tend to do a better job at keeping you inside it, and so it is not easy to get to the actual machine architecture.
Following up on #104763, this PR makes the
-archparameter default to the OS architecture. I am not sure why we currently default to the current process architecture, but if I were to make a guess it's probably stemming from restrictions in older versions of Windows ARM when running emulated processes. In any case, I think we should change it because: