set __ThisScriptFull="%~f0"
set __ThisScriptDir="%~dp0"
-call "%__ThisScriptDir%"\setup_vs_tools.cmd
+call %__ThisScriptDir%\setup_vs_tools.cmd
if NOT '%ERRORLEVEL%' == '0' goto ExitWithError
if defined VS160COMNTOOLS (
if not exist "%__LogsDir%" md "%__LogsDir%"
if not exist "%__MsbuildDebugLogsDir%" md "%__MsbuildDebugLogsDir%"
-if not exist "%__RootBinDir%\Directory.Build.props" copy %__ProjectDir%\EmptyProps.props %__RootBinDir%\Directory.Build.props
-if not exist "%__RootBinDir%\Directory.Build.targets" copy %__ProjectDir%\EmptyProps.props %__RootBinDir%\Directory.Build.targets
+if not exist "%__RootBinDir%\Directory.Build.props" copy "%__ProjectDir%\EmptyProps.props" "%__RootBinDir%\Directory.Build.props"
+if not exist "%__RootBinDir%\Directory.Build.targets" copy "%__ProjectDir%\EmptyProps.props" "%__RootBinDir%\Directory.Build.targets"
REM Set up the directory for MSBuild debug logs.
set MSBUILDDEBUGPATH=%__MsbuildDebugLogsDir%
if %__SkipGenerateVersion% EQU 0 (
echo %__MsgPrefix%Generating native version headers
- set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
+ set "__BinLog=\"%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog\""
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
- %__RepoRootDir%\eng\empty.csproj /t:GenerateRuntimeVersionFile /restore^
+ "%__RepoRootDir%\eng\empty.csproj" /t:GenerateRuntimeVersionFile /restore^
/p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^
/p:RuntimeVersionFile="%__RootBinDir%\obj\coreclr\runtime_version.h"^
%__CommonMSBuildArgs% %__UnprocessedBuildArgs% /bl:!__BinLog!
set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj
if %__RestoreOptData% EQU 1 (
echo %__MsgPrefix%Restoring the OptimizationData Package
- set "__BinLog=%__LogsDir%\OptRestore_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
+ set "__BinLog=\"%__LogsDir%\OptRestore_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog\""
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
- %OptDataProjectFilePath% /t:Restore^
+ "%OptDataProjectFilePath%" /t:Restore^
%__CommonMSBuildArgs% %__UnprocessedBuildArgs%^
/nodereuse:false /bl:!__BinLog!
if not !errorlevel! == 0 (
)
set __PgoOptDataPath=
if %__PgoOptimize% EQU 1 (
- set PgoDataPackagePathOutputFile="%__IntermediatesDir%\optdatapath.txt"
- set "__BinLog=%__LogsDir%\PgoVersionRead_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
+ set PgoDataPackagePathOutputFile=%__IntermediatesDir%\optdatapath.txt
+ set "__BinLog=\"%__LogsDir%\PgoVersionRead_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog\""
REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
if /i "%__CrossArch2%" == "x86" ( set __VCBuildArch=x86 )
if /i "%__CrossArch2%" == "x64" ( set __VCBuildArch=x86_amd64 )
- set __CMakeBinDir=%__CrossComponent2BinDir%
+ set __CMakeBinDir="%__CrossComponent2BinDir%"
set "__CMakeBinDir=!__CMakeBinDir:\=/!"
set __ExtraCmakeArgs=%__CMakeClrBuildSubsetArgs% "-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=0" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=0" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" %__CMakeArgs%
call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossComp2IntermediatesDir%" %__VSVersion% %__CrossArch2% !__ExtraCmakeArgs!
if defined __ConfigureOnly goto SkipCrossCompBuild
set __BuildLogRootName=Cross
- set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log"
- set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn"
- set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err"
- set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
+ set "__BuildLog="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log""
+ set "__BuildWrn="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn""
+ set "__BuildErr="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err""
+ set "__BinLog="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog""
set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!"
set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!"
set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!"
set "__Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! !__MsbuildBinLog! !__ConsoleLoggingParameters!"
REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds.
- "%CMakePath%" --build %__CrossCompIntermediatesDir% --target install --config %__BuildType% -- /nologo /m !__Logging!
+ "%CMakePath%" --build "%__CrossCompIntermediatesDir%" --target install --config %__BuildType% -- /nologo /m !__Logging!
if not !errorlevel! == 0 (
set __exitCode=!errorlevel!
set "__Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! !__MsbuildBinLog! !__ConsoleLoggingParameters!"
REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds.
- "%CMakePath%" --build %__CrossComp2IntermediatesDir% --target install --config %__BuildType% -- /nologo /m !__Logging!
+ "%CMakePath%" --build "%__CrossComp2IntermediatesDir%" --target install --config %__BuildType% -- /nologo /m !__Logging!
if not !errorlevel! == 0 (
set __exitCode=!errorlevel!
if defined __ConfigureOnly goto SkipNativeBuild
set __BuildLogRootName=CoreCLR
- set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log"
- set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn"
- set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err"
- set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
+ set "__BuildLog="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log""
+ set "__BuildWrn="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn""
+ set "__BuildErr="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err""
+ set "__BinLog="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog""
set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!"
set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!"
set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!"
set "__Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! !__MsbuildBinLog! !__ConsoleLoggingParameters!"
REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds.
- "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- /nologo /m !__Logging!
+ "%CMakePath%" --build "%__IntermediatesDir%" --target install --config %__BuildType% -- /nologo /m !__Logging!
if not !errorlevel! == 0 (
set __exitCode=!errorlevel!