Skip to content

Commit

Permalink
Merge pull request microsoft#77 from tex3d/vstools-x64
Browse files Browse the repository at this point in the history
Use amd64 VS build tools instead of default x86 tools
  • Loading branch information
tex3d authored Feb 10, 2017
2 parents 0eaca4e + bbc14d2 commit 4d6c990
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion utils/hct/hctbuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ set CMAKE_OPTS=%CMAKE_OPTS% -DCLANG_BUILD_EXAMPLES:BOOL=OFF
set CMAKE_OPTS=%CMAKE_OPTS% -DLLVM_REQUIRES_RTTI:BOOL=ON
set CMAKE_OPTS=%CMAKE_OPTS% -DCLANG_CL:BOOL=OFF

rem This parameter is used with vcvarsall to force use of 64-bit build tools
rem instead of 32-bit tools that run out of memory.
if "%BUILD_ARCH%"=="Win32" (
set BUILD_TOOLS=amd64_x86
) else if "%BUILD_ARCH%"=="x64" (
set BUILD_TOOLS=amd64
) else if "%BUILD_ARCH%"=="ARM" (
set BUILD_TOOLS=amd64_arm
)

call :configandbuild %BUILD_CONFIG% %BUILD_ARCH% %HLSL_BLD_DIR% "%BUILD_GENERATOR%"
if errorlevel 1 exit /b 1

Expand Down Expand Up @@ -215,7 +225,7 @@ rem 1 - config
rem 2 - platform
rem 3 - build directory
setlocal
call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %BUILD_TOOLS%
rem Add /ds for a detailed summary at the end.
MSBuild.exe /property:Configuration=%1 /property:Platform=%2 /maxcpucount %3\LLVM.sln
if NOT "%ERRORLEVEL%"=="0" (
Expand Down
3 changes: 3 additions & 0 deletions utils/hct/hctstart.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ shift /1

:donearch
echo Default architecture - set BUILD_ARCH=%BUILD_ARCH%
rem Set the following environment variable globally, or start Visual Studio
rem from this command line in order to use 64-bit tools.
set PreferredToolArchitecture=x64

if "%1"=="" (
echo Source directory missing.
Expand Down

0 comments on commit 4d6c990

Please sign in to comment.