diff options
author | Tomáš Rylek <trylek@microsoft.com> | 2021-01-16 13:24:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 13:24:40 +0300 |
commit | ea4f5f2c501599b9397d14274bbfe5513b0ff03b (patch) | |
tree | 652151c60bc3c2ea4eeaa3e890e8c5b3ce4d146d /src/tests/build.cmd | |
parent | 3aa65f262ac54fa8417c5e9fc08a0c2b3e14ea46 (diff) |
Initial PDB / PerfMap support in Crossgen2 + System.Private.CoreLib switchover to use Crossgen2 (#47019)
I have moved the PDB writer code to a new assembly
ILCompiler.Diagnostics so that it can be reused by Crossgen2.
I have also added an initial trivial implementation of the
PerfMap writer.
Thanks
Tomas
Diffstat (limited to 'src/tests/build.cmd')
-rw-r--r-- | src/tests/build.cmd | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tests/build.cmd b/src/tests/build.cmd index 02ba6b5a49c..985568d0712 100644 --- a/src/tests/build.cmd +++ b/src/tests/build.cmd @@ -56,6 +56,7 @@ set __TargetsWindows=1 set __DoCrossgen= set __DoCrossgen2= set __CompositeBuildMode= +set __CreatePdb= set __CopyNativeTestBinaries=0 set __CopyNativeProjectsAfterCombinedTestBuild=true set __SkipGenerateLayout=0 @@ -108,6 +109,7 @@ if /i "%1" == "buildagainstpackages" (echo error: Remove /BuildAgainstPackages if /i "%1" == "crossgen" (set __DoCrossgen=1&set __TestBuildMode=crossgen&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "crossgen2" (set __DoCrossgen2=1&set __TestBuildMode=crossgen2&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "composite" (set __CompositeBuildMode=1&set __DoCrossgen2=1&set __TestBuildMode=crossgen2&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "pdb" (set __CreatePdb=1&shift&goto Arg_Loop) if /i "%1" == "targetsNonWindows" (set __TargetsWindows=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "Exclude" (set __Exclude=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) if /i "%1" == "-priority" (set __Priority=%2&shift&set processedArgs=!processedArgs! %1=%2&shift&goto Arg_Loop) @@ -583,6 +585,10 @@ set "__CrossgenOutputDir=%__TestIntermediatesDir%\crossgen.out" set __CrossgenCmd="%__RepoRootDir%\dotnet.cmd" "%CORE_ROOT%\R2RTest\R2RTest.dll" compile-framework -cr "%CORE_ROOT%" --output-directory "%__CrossgenOutputDir%" --release --nocleanup --target-arch %__BuildArch% -dop %NUMBER_OF_PROCESSORS% +if defined __CreatePdb ( + set __CrossgenCmd=!__CrossgenCmd! --pdb +) + if defined __CompositeBuildMode ( set __CrossgenCmd=%__CrossgenCmd% --composite ) else ( @@ -620,7 +626,12 @@ if %__exitCode% neq 0 ( exit /b 1 ) -move "%__CrossgenOutputDir%\*.dll" %CORE_ROOT% > nul +move /Y "%__CrossgenOutputDir%\*.dll" %CORE_ROOT% > nul + +if defined __CreatePdb ( + move /Y "!__CrossgenOutputDir!\*.ni.pdb" !CORE_ROOT! > nul + copy /Y "!__BinDir!\PDB\System.Private.CoreLib.ni.pdb" !CORE_ROOT! > nul +) exit /b 0 |