sdk: auto-detect StrideNativeBuildMode#3161
Conversation
MSVC only when targeting Windows AND the VS C++ tools are loaded in the current shell (VCINSTALLDIR set). Clang everywhere else, including cross-compile from Windows hosts. Removes the need for -p:StrideNativeBuildMode=Clang in 12 CI workflows + test-linux-gpu.ps1 (release.yml keeps the override since it runs msbuild.exe with VS env active).
|
@xen2
Still, it is a big improvement because now dotnet build does work from a regular console prompt. We need to update our build documentation to explain this behavior. |
Thanks for the feedback, I reviewed all case and I think the 55b468e should fix those. I also took the opportunity to simplify top-level README.md build instructions and moved details to another file in 6ee2e04. |
Pick MSVC only when targeting Windows AND the VS C++ tools are loaded
(VCINSTALLDIR set), Clang otherwise.
dotnet buildfrom a regular shell on Windows now works out of the box-p:StrideNativeBuildMode=Clangfrom many CI workflows (release.yml keeps it, it runs msbuild.exewith VS env active)
Note: we'll have to check if MSVC mode is really necessary still at all.