diff options
author | Vance Morrison <vancem@microsoft.com> | 2016-09-22 06:46:49 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-09-22 06:46:49 -0700 |
commit | 787f727c64c1b3034434be265d103fb7d4e0950f (patch) | |
tree | 9098682abfaa9ee30e2b4661fa13819b6f8346d2 /build.cmd | |
parent | 0c3727eaaad0f255e18959f835de0dca3ce714eb (diff) | |
download | coreclr-787f727c64c1b3034434be265d103fb7d4e0950f.tar.gz coreclr-787f727c64c1b3034434be265d103fb7d4e0950f.tar.bz2 coreclr-787f727c64c1b3034434be265d103fb7d4e0950f.zip |
Generate CrossGen Pdbs as part of bulid (#7298)
This change has two parts. The first part changes build.cmd and the pkgproj
so that as part of generating a .NET Core package we also generate the PDBS
for the Native System.Private.Corelib.ni.dll.
The second part changes crossgen so that it marks the Native Images as having
a list of 0 exports. This is important because we want the generated PDBs
to be naturally published on the symbol server, and currently the symbol server
skips DLLs what are 'resource only' (no imports or exports). Because native
images don't use 'normal' PE imports and exports, they get optimized away
by the symbol server. Making a empy list of exports fixes this.
Diffstat (limited to 'build.cmd')
-rw-r--r-- | build.cmd | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -167,6 +167,11 @@ if not exist "%__BinDir%" md "%__BinDir%" if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%" if not exist "%__LogsDir%" md "%__LogsDir%" +REM It is convinient to have your Nuget search path include the location where the build +REM will plass packages. However nuget used during the build will fail if that directory +REM does not exist. Avoid this in at least one case by agressively creating the directory. +if not exist "%__BinDir%\.nuget\pkg" md "%__BinDir%\.nuget\pkg" + echo %__MsgPrefix%Commencing CoreCLR Repo build :: Set the remaining variables based upon the determined build configuration @@ -344,13 +349,22 @@ if %__BuildCoreLib% EQU 1 ( ) ) +REM Need diasymreader.dll on your path for /CreatePdb +set PATH=%PATH%;%WinDir%\Microsoft.Net\Framework64\V4.0.30319;%WinDir%\Microsoft.Net\Framework\V4.0.30319 + if %__BuildNativeCoreLib% EQU 1 ( echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType% echo "%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\System.Private.CoreLib.ni.dll" "%__BinDir%\System.Private.CoreLib.dll" "%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\System.Private.CoreLib.ni.dll" "%__BinDir%\System.Private.CoreLib.dll" > "%__CrossGenCoreLibLog%" 2>&1 if NOT !errorlevel! == 0 ( - echo %__MsgPrefix%Error: CrossGen System.Private.CoreLib build failed. Refer to the build log file for details: + echo %__MsgPrefix%Error: CrossGen System.Private.CoreLib build failed. Refer to %__CrossGenCoreLibLog% + echo %__CrossGenCoreLibLog% + exit /b 1 + ) + "%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /CreatePdb "%__BinDir%\PDB" "%__BinDir%\System.Private.CoreLib.ni.dll" >> "%__CrossGenCoreLibLog%" 2>&1 + if NOT !errorlevel! == 0 ( + echo %__MsgPrefix%Error: CrossGen /CreatePdb System.Private.CoreLib build failed. Refer to %__CrossGenCoreLibLog% echo %__CrossGenCoreLibLog% exit /b 1 ) @@ -368,6 +382,8 @@ if %__BuildNativeCoreLib% EQU 1 ( ) if %__BuildPackages% EQU 1 ( + echo %__MsgPrefix%Building Packages for %__BuildOS%.%__BuildArch%.%__BuildType% + set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.log" set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.err" |