New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Visual Studio 2019 build by default #3138
Conversation
Remove VS2015 support
Fix cmake detection from Visual Studio installations (cmake.exe on PATH always takes precedence) Use CMAKE_GENERATOR to detect VS version used and select the corresponding DIA SDK Fix c:\Program Files paths to use environment variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a welcome improvement that does all it says it does. I've added some comments about other things that you may choose to do now or not. With or without those changes, I think this is ready to go.
cmake/modules/FindDiaSDK.cmake
Outdated
OUTPUT_VARIABLE VSWHERE_LATEST | ||
ERROR_QUIET | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
# Find the DIA SDK path, it will typically look something like this. | ||
# C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\DIA SDK\include | ||
# C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\DIA SDK\include | ||
# C:\Program Files (x86)\Microsoft Visual Studio 14.0\DIA SDK\include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the removal of the top two comments and leaving the others made in error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
utils/hct/hctbuild.cmd
Outdated
rem If only VS 2019 is available, pick that by default. | ||
if "%BUILD_VS_VER%"=="2017" ( | ||
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017" ( | ||
echo Visual Studio 2017 not available, setting up build for Visual Studio 2019. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this results from a user specifying 2017, it might be more accurate to say "trying to set up build" since it might well fail since they might have specified 2017 since they don't have 2019.
I'm not sure I would find this behavior helpful. Covertly getting 2019 when I specified 2017 might confuse and ultimately frustrate me more than being told it wasn't available and I'd have to use 2019.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll fix that.
utils/hct/hctbuild.cmd
Outdated
|
||
if "%BUILD_VS_VER%"=="2019" ( | ||
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019" ( | ||
echo Visual Studio 2019 not available. Use hctbuild -vs2017 to build with Visual Studio 2017. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case and the 2017 case, I think it would be useful if the error message included the path it failed to find which led to this conclusion. If someone installed VS somewhere bizarre, they would at least immediately know the cause.
I remember someone having that problem with an unconventional VS installation location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This too.
❌ Build DirectXShaderCompiler 1.0.3619 failed (commit 2f5d131b59 by @hekota) |
❌ Build DirectXShaderCompiler 1.0.3621 failed (commit 51e4757880 by @hekota) |
❌ Build DirectXShaderCompiler 1.0.3627 failed (commit 3dd261baaf by @hekota) |
❌ Build DirectXShaderCompiler 1.0.3635 failed (commit 9aa11f1385 by @hekota) |
❌ Build DirectXShaderCompiler 1.0.3637 failed (commit 4a78a2102a by @hekota) |
✅ Build DirectXShaderCompiler 1.0.3640 completed (commit 5fbbc8f944 by @hekota) |
This PR is switching the default build of DXC to Visual Studio 2019.
The build script hctbuild.cmd will error when VS2019 is not installed. Use -vs2017 option to build with VS2017.
VS2015 is no longer supported.
Removes cmake version checking from hctstart.cmd
Fixes cmake detection in Visual Studio installations
Fixes DIA SDK lookup - use CMAKE_GENERATOR to detect VS version used and select the corresponding DIA SDK
Use environment variable instead of c:\Program Files