Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/native/gen-buildsys.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if /i "%__Ninja%" == "1" (
set __CmakeGenerator=Ninja
) else (
if /i NOT "%__Arch%" == "wasm" (
if /i "%__VSVersion%" == "vs2022" (set __CmakeGenerator=%__CmakeGenerator% 17 2022)
if /i "%__VSVersion%" == "17.0" (set __CmakeGenerator=%__CmakeGenerator% 17 2022)

if /i "%__Arch%" == "x64" (set __ExtraCmakeParams=%__ExtraCmakeParams% -A x64)
if /i "%__Arch%" == "arm" (set __ExtraCmakeParams=%__ExtraCmakeParams% -A ARM)
Expand Down
6 changes: 1 addition & 5 deletions eng/native/init-vs-env.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ set "__VSCOMNTOOLS="
set "VSCMD_START_DIR="

:VSDetected
if "%VisualStudioVersion%"=="17.0" (
set __VSVersion=vs2022
set __PlatformToolset=v143
goto :SetVCEnvironment
)
goto :SetVCEnvironment

:VSMissing
echo %__MsgPrefix%Error: Visual Studio 2022 with C++ tools required. ^
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/build-runtime.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ if [!__PassThroughArgs!]==[] (
set "__PassThroughArgs=%__PassThroughArgs% %1"
)

if /i "%1" == "-hostos" (set __HostOS=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "-hostos" (set __HostOS=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "-hostarch" (set __HostArch=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "-os" (set __TargetOS=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "-outputrid" (set __OutputRid=%2&shift&shift&goto Arg_Loop)
Expand Down Expand Up @@ -400,9 +400,9 @@ if %__BuildNative% EQU 1 (
)

set __ExtraCmakeArgs=!__ExtraCmakeArgs! %__CMakeArgs%
echo Calling "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__HostArch% !__HostOS! !__ExtraCmakeArgs!
call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__HostArch% !__HostOS! !__ExtraCmakeArgs!

echo Calling "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__HostArch% !__HostOS! !__ExtraCmakeArgs!
call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__HostArch% !__HostOS! !__ExtraCmakeArgs!
if not !errorlevel! == 0 (
echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project!
goto ExitWithError
Expand Down Expand Up @@ -490,7 +490,7 @@ set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetAr
if %__TotalSpecifiedTargetArch% EQU 0 (
REM Nothing specified means we want to build all architectures.
set __TargetArchList=x64 x86 arm arm64

if %__BuildAllJitsCommunity%==1 (
set __TargetArchList=%__TargetArchList% loongarch64 riscv64
)
Expand Down
6 changes: 3 additions & 3 deletions src/native/corehost/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCLI_CMAKE_PKG_RID=%cm_BaseRid%" "
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCLI_CMAKE_RESOURCE_DIR=%__ResourcesDir%" "-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%"

:: Regenerate the native build files
echo Calling "%__engNativeDir%\gen-buildsys.cmd "%__sourceDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%"
echo Calling "%__engNativeDir%\gen-buildsys.cmd "%__sourceDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%"

call "%__engNativeDir%\gen-buildsys.cmd" "%__sourceDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%
call "%__engNativeDir%\gen-buildsys.cmd" "%__sourceDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%
if NOT [%errorlevel%] == [0] goto :Failure
popd

Expand All @@ -126,7 +126,7 @@ if [%__Ninja%] == [1] (
) else if [%__BuildArch%] == [wasm] (
set __generatorArgs=-j
) else (
set __generatorArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%" -noWarn:MSB8065
set __generatorArgs=
)

call "%CMakePath%" --build "%__IntermediatesDir%" --target install --config %CMAKE_BUILD_TYPE% -- %__generatorArgs%
Expand Down
4 changes: 2 additions & 2 deletions src/native/libs/build-native.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if /i "%__TargetOS%" == "linux-bionic" (

:: Regenerate the VS solution

call "%__repoRoot%\eng\native\gen-buildsys.cmd" "%__sourceRootDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%
call "%__repoRoot%\eng\native\gen-buildsys.cmd" "%__sourceRootDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%
if NOT [%errorlevel%] == [0] goto :Failure

:BuildNativeProj
Expand All @@ -129,7 +129,7 @@ if [%__Ninja%] == [1] (
) else if [%__TargetOS%] == [wasi] (
set __generatorArgs=
) else (
set __generatorArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%" -noWarn:MSB8065
set __generatorArgs=
)

call "%CMakePath%" --build "%__IntermediatesDir%" --target install --config %CMAKE_BUILD_TYPE% -- %__generatorArgs%
Expand Down
2 changes: 1 addition & 1 deletion src/tests/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ if %__Ninja% EQU 1 (
) else (
set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0"
)
call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectFilesDir%" "%__NativeTestIntermediatesDir%" %__VSVersion% %__BuildArch% %__TargetOS% !__ExtraCmakeArgs! !__CMakeArgs!
call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectFilesDir%" "%__NativeTestIntermediatesDir%" %VisualStudioVersion% %__BuildArch% %__TargetOS% !__ExtraCmakeArgs! !__CMakeArgs!

if not !errorlevel! == 0 (
echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project!
Expand Down
Loading