Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit b053bfb

Browse files
authored
Add option to hctbuild.cmd to skip building dxilconv.dll and related tools (microsoft#2739)
1 parent 8d79e00 commit b053bfb

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ option(HLSL_ENABLE_FIXED_VER "Reads version information from a file." OFF) # HLS
8787

8888
option(HLSL_ENABLE_ANALYZE "Enables compiler analysis during compilation." OFF) # HLSL Change
8989
option(HLSL_OPTIONAL_PROJS_IN_DEFAULT "Include optional projects in default build target." OFF) # HLSL Change
90+
option(HLSL_BUILD_DXILCONV "Include DXBC to DXIL converter and tools." ON) # HLSL Change
9091

9192
# HLSL Change Starts - support commit querying
9293
option(HLSL_SUPPORT_QUERY_GIT_COMMIT_INFO "Supports querying Git commit info." ON)

projects/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
if(WIN32)
1+
if(WIN32 AND HLSL_BUILD_DXILCONV)
22
add_subdirectory(dxilconv)
33
endif (WIN32)

tools/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ else()
1313
ignore_llvm_tool_subdirectory(llvm-shlib)
1414
endif()
1515

16+
if (HLSL_BUILD_DXILCONV) # HLSL Change
1617
add_llvm_tool_subdirectory(opt) # HLSL Change
18+
endif()
19+
1720
# add_llvm_tool_subdirectory(llvm-as) # HLSL Change
1821
# add_llvm_tool_subdirectory(llvm-dis) # HLSL Change
1922
# add_llvm_tool_subdirectory(llvm-mc) # HLSL Change

utils/hct/hctbuild.cmd

+9-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ set FIXED_LOC=
5656
set VENDOR=
5757
set SPIRV=OFF
5858
set SPV_TEST=OFF
59+
set DXILCONV=ON
5960

6061
if "%1"=="-s" (
6162
set DO_BUILD=0
@@ -159,6 +160,11 @@ if "%1"=="-no-parallel" (
159160
shift /1
160161
)
161162

163+
if "%1"=="-no-dxilconv" (
164+
set DXILCONV=OFF
165+
shift /1
166+
)
167+
162168
rem If only VS 2017 is available, pick that by default.
163169
if "%BUILD_VS_VER%"=="2015" (
164170
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\14.0\devenv /v Install /reg:32 1>nul 2>nul
@@ -212,6 +218,7 @@ set CMAKE_OPTS=%CMAKE_OPTS% -DHLSL_ENABLE_ANALYZE:BOOL=%ANALYZE%
212218
set CMAKE_OPTS=%CMAKE_OPTS% -DHLSL_OFFICIAL_BUILD:BOOL=%OFFICIAL%
213219
set CMAKE_OPTS=%CMAKE_OPTS% -DHLSL_ENABLE_FIXED_VER:BOOL=%FIXED_VER%
214220
set CMAKE_OPTS=%CMAKE_OPTS% -DHLSL_ENABLE_FIXED_VER:BOOL=%FIXED_VER% -DHLSL_FIXED_VERSION_LOCATION:STRING=%FIXED_LOC%
221+
set CMAKE_OPTS=%CMAKE_OPTS% -DHLSL_BUILD_DXILCONV:BOOL=%DXILCONV%
215222
set CMAKE_OPTS=%CMAKE_OPTS% -DCLANG_VENDOR:STRING=%VENDOR%
216223
set CMAKE_OPTS=%CMAKE_OPTS% -DENABLE_SPIRV_CODEGEN:BOOL=%SPIRV%
217224
set CMAKE_OPTS=%CMAKE_OPTS% -DSPIRV_BUILD_TESTS:BOOL=%SPV_TEST%
@@ -289,7 +296,7 @@ exit /b 0
289296
echo Builds HLSL solutions and the product and test binaries for the current
290297
echo flavor and architecture.
291298
echo.
292-
echo hctbuild [-s or -b] [-alldef] [-analyze] [-official] [-fv] [-fvloc <path>] [-rel] [-arm or -arm64 or -x86 or -x64] [-Release] [-Debug] [-vs2015] [-ninja] [-tblgen path] [-dont-speak] [-parallel]
299+
echo hctbuild [-s or -b] [-alldef] [-analyze] [-official] [-fv] [-fvloc <path>] [-rel] [-arm or -arm64 or -x86 or -x64] [-Release] [-Debug] [-vs2015] [-ninja] [-tblgen path] [-dont-speak] [-no-parallel] [-no-dxilconv]
293300
echo.
294301
echo -s creates the projects only, without building
295302
echo -b builds the existing project
@@ -302,6 +309,7 @@ echo -fvloc <path> directory with the version.inc file
302309
echo -rel builds release rather than debug
303310
echo -dont-speak disables audible build confirmation
304311
echo -no-parallel disables parallel build
312+
echo -no-dxilconv disables build of DXBC to DXIL converter and tools
305313
echo.
306314
echo current BUILD_ARCH=%BUILD_ARCH%. Override with:
307315
echo -x86 targets an x86 build (aka. Win32)

0 commit comments

Comments
 (0)