DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Visual Studio 2026 support

Open Goshido opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe. hctbuild.cmd does not have an option to select Visual Studio 2026. Latest available option is -vs2022. This results the following error:

utils\hct\hctbuild.cmd                      ^
    -official                               ^
    -rel                                    ^
    -x64                                    ^
    -vs2022                                 ^
    -speak-up                               ^
    -no-dxilconv                            ^
    -spirv                                  ^
    -lto

:: Output

TER= -G "Visual Studio 17 2022" "-Ax64" D:\Development\DirectXShaderCompiler
CMake Error at CMakeLists.txt:26 (project):
  Generator

    Visual Studio 17 2022

  could not find any instance of Visual Studio.

Describe the solution you'd like I suggest to upgrade DXC build system

diff --git a/utils/hct/hctbuild.cmd b/utils/hct/hctbuild.cmd
index 87f19581f..fad537dee 100644
--- a/utils/hct/hctbuild.cmd
+++ b/utils/hct/hctbuild.cmd
@@ -138,6 +138,10 @@ if "%1"=="-vs2019" (
 if "%1"=="-vs2022" (
   shift /1 & goto :parse_args
 )
+if "%1"=="-vs2026" (
+  set BUILD_GENERATOR=Visual Studio 18 2026
+  shift /1 & goto :parse_args
+)
 if "%1"=="-tblgen" (
   if "%~2" == "" (
     echo Missing path argument after -tblgen.

I was able to build DXC using such small change. Commit: 025ca7b04b87e335253c2aa08e7a541348558984

Describe alternatives you've considered N/A

Additional context N/A

Goshido avatar Nov 15 '25 05:11 Goshido