summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorMike Danes <onemihaid@hotmail.com>2015-08-01 11:04:16 +0300
committerMike Danes <onemihaid@hotmail.com>2015-08-04 11:00:34 +0300
commit8bb8ed66e4e54270e18e68c37515f21730c82cea (patch)
treea8f713371002b0a037965b4020ffd254a1de73aa /build.cmd
parentfd1fbb93e8435c371dea39f16c0cf6d030b8c7dd (diff)
downloadcoreclr-8bb8ed66e4e54270e18e68c37515f21730c82cea.tar.gz
coreclr-8bb8ed66e4e54270e18e68c37515f21730c82cea.tar.bz2
coreclr-8bb8ed66e4e54270e18e68c37515f21730c82cea.zip
Enable the Windows x86 build
This allows building the Windows x86 version of CoreCLR by using "x86" for the BuildArch parameter of build.cmd. Note that CMAKE_SYSTEM_PROCESSOR is no longer used in Windows builds to set IS_64BIT_BUILD. This change is enough to get CoreCLR to build but more changes are required for it to actually run correctly. In particular, the JIT compiler support for x86 is pretty limited at this point.
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd9
1 files changed, 6 insertions, 3 deletions
diff --git a/build.cmd b/build.cmd
index fb15d813b4..eb50341eea 100644
--- a/build.cmd
+++ b/build.cmd
@@ -26,6 +26,7 @@ set __SkipTestBuild=
if "%1" == "" goto ArgsDone
if /i "%1" == "/?" goto Usage
if /i "%1" == "x64" (set __BuildArch=x64&&shift&goto Arg_Loop)
+if /i "%1" == "x86" (set __BuildArch=x86&&shift&goto Arg_Loop)
if /i "%1" == "arm" (set __BuildArch=arm&&shift&goto Arg_Loop)
if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop)
@@ -135,7 +136,9 @@ echo Commencing build of native components for %__BuildOS%.%__BuildArch%.%__Buil
echo.
:: Set the environment for the native build
-call "!VS%__VSProductVersion%COMNTOOLS!\..\..\VC\vcvarsall.bat" x86_amd64
+set __VCBuildArch=x86_amd64
+if /i "%__BuildArch%" == "x86" (set __VCBuildArch=x86)
+call "!VS%__VSProductVersion%COMNTOOLS!\..\..\VC\vcvarsall.bat" %__VCBuildArch%
if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
@@ -151,7 +154,7 @@ exit /b 1
:GenVSSolution
:: Regenerate the VS solution
pushd "%__IntermediatesDir%"
-call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion%
+call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__BuildArch%
popd
:BuildComponents
@@ -234,7 +237,7 @@ echo.
echo Usage:
echo %0 BuildArch BuildType [clean] [vsversion] where:
echo.
-echo BuildArch can be: x64
+echo BuildArch can be: x64, x86
echo BuildType can be: Debug, Release
echo Clean - optional argument to force a clean build.
echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2013)