From 4a13a029ef492ce167cf2ec0e46ae5e5cd08dda2 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Mon, 18 Jul 2016 13:42:18 -0700 Subject: [PATCH] Add to model.xml several members we wish to expose in the FX (#6310) * Add to model.xml several members we wish to expose in the FX. Done by pulling lines selectively from a model.xml created from the full s.p.corelib.dll. * Add parameter to build.cmd to build both mscorlib and its native image, then stop. Also dump any errors to console for CI. * Fix up to date check of BCLRewriter: should build when model.xml is changed --- build.cmd | 14 +- src/mscorlib/Tools/BclRewriter/BclRewriter.targets | 2 +- src/mscorlib/model.xml | 295 ++++++++++++++++----- src/vm/ecalllist.h | 6 +- 4 files changed, 239 insertions(+), 78 deletions(-) diff --git a/build.cmd b/build.cmd index 4bbc3c8..5439ca5 100644 --- a/build.cmd +++ b/build.cmd @@ -46,6 +46,7 @@ set "__LogsDir=%__RootBinDir%\Logs" set __CleanBuild= set __CoreLibOnly= +set __CoreLibAlsoNativeImage= set __ConfigureOnly= set __SkipConfigure= set __SkipCoreLibBuild= @@ -112,6 +113,7 @@ if /i "%1" == "netbsdmscorlib" (set __CoreLibOnly=1&set __BuildOS=NetBSD&se if /i "%1" == "osxmscorlib" (set __CoreLibOnly=1&set __BuildOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "windowsmscorlib" (set __CoreLibOnly=1&set __BuildOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "nativemscorlib" (set __CoreLibAlsoNativeImage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "vs2015" (set __VSVersion=%1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "configureonly" (set __ConfigureOnly=1&set __SkipCoreLibBuild=1&set __SkipBuildPackages=1&set __SkipTestBuild=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -497,12 +499,15 @@ if errorlevel 1 ( echo %__BuildLog% echo %__BuildWrn% echo %__BuildErr% + type %__BuildErr% exit /b 1 ) if defined __CoreLibOnly ( echo %__MsgPrefix%System.Private.CoreLib successfully built. - exit /b 0 + if not defined __CoreLibAlsoNativeImage ( + exit /b 0 + ) ) echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType% @@ -513,6 +518,7 @@ set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe" if NOT %errorlevel% == 0 ( echo %__MsgPrefix%Error: CrossGen System.Private.CoreLib build failed. Refer to the build log file for details: echo %__CrossGenCoreLibLog% + type %__CrossGenCoreLibLog% exit /b 1 ) @@ -524,9 +530,14 @@ set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe" if NOT %errorlevel% == 0 ( echo %__MsgPrefix%Error: CrossGen mscorlib facade build failed. Refer to the build log file for details: echo %__CrossGenCoreLibLog% + type %__CrossGenCoreLibLog% exit /b 1 ) +if defined __CoreLibAlsoNativeImage ( + exit /b 0 +) + :SkipCoreLibBuild :GenerateNuget @@ -714,6 +725,7 @@ echo mscorlib version: one of freebsdmscorlib, linuxmscorlib, netbsdmscorlib, os echo or windowsmscorlib. If one of these is passed, only System.Private.CoreLib is built, echo for the specified platform ^(FreeBSD, Linux, NetBSD, OS X or Windows, echo respectively^). +echo add nativemscorlib to go further and build the native image for designated mscorlib. echo priority ^ : specify a set of test that will be built and run, with priority N. echo sequential: force a non-parallel build ^(default is to build in parallel echo using all processors^). diff --git a/src/mscorlib/Tools/BclRewriter/BclRewriter.targets b/src/mscorlib/Tools/BclRewriter/BclRewriter.targets index e3a62e2..9121ca6 100644 --- a/src/mscorlib/Tools/BclRewriter/BclRewriter.targets +++ b/src/mscorlib/Tools/BclRewriter/BclRewriter.targets @@ -16,7 +16,7 @@ + Inputs="$(BclRewriterModelFile);@(AnnotatedAssembly)" Outputs="@(RewrittenAssembly)" DependsOnTargets="$(BclRewriterDependencyTargets)"> win diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml index fa5c9c0..ac56d95 100644 --- a/src/mscorlib/model.xml +++ b/src/mscorlib/model.xml @@ -371,6 +371,11 @@ + + + + + @@ -514,6 +519,16 @@ + + + + + + + + + + @@ -725,6 +740,7 @@ + @@ -947,7 +963,6 @@ - @@ -997,17 +1012,22 @@ + + + + + @@ -1025,6 +1045,7 @@ + @@ -1040,8 +1061,10 @@ + + @@ -1056,10 +1079,24 @@ + + + + + + + + + + + + + + @@ -1081,6 +1118,7 @@ + @@ -1098,6 +1136,7 @@ + @@ -1116,6 +1155,7 @@ + @@ -1134,6 +1174,7 @@ + @@ -1152,6 +1193,7 @@ + @@ -1170,6 +1212,7 @@ + @@ -1212,6 +1255,8 @@ + + @@ -1221,6 +1266,7 @@ + @@ -1239,6 +1285,7 @@ + @@ -1257,6 +1304,7 @@ + @@ -1357,10 +1405,6 @@ - - - - @@ -1378,6 +1422,10 @@ + + + + @@ -1395,6 +1443,12 @@ + + + + + + @@ -1494,12 +1548,6 @@ - - - - - - @@ -1576,6 +1624,7 @@ + @@ -1625,13 +1674,17 @@ + + + + @@ -1644,6 +1697,9 @@ + + + @@ -1658,18 +1714,18 @@ + + + + - - - - @@ -1795,6 +1851,12 @@ + + + + + + @@ -1815,9 +1877,19 @@ + + + + + + + + + + @@ -1890,6 +1962,7 @@ + @@ -1902,6 +1975,7 @@ + @@ -1913,7 +1987,6 @@ - @@ -2007,6 +2080,7 @@ + @@ -2299,7 +2373,6 @@ - @@ -3170,10 +3243,13 @@ + + + @@ -3262,10 +3338,12 @@ + + @@ -3288,6 +3366,9 @@ + + + @@ -3295,6 +3376,8 @@ + + @@ -3345,8 +3428,8 @@ - + @@ -3430,7 +3513,6 @@ - @@ -3735,7 +3817,6 @@ - @@ -3774,7 +3855,6 @@ - @@ -3788,7 +3868,6 @@ - @@ -3807,7 +3886,6 @@ - @@ -5366,7 +5444,6 @@ - @@ -6326,11 +6403,17 @@ + + + + + + @@ -6384,6 +6467,10 @@ + @@ -6403,6 +6490,10 @@ + @@ -6420,6 +6511,7 @@ + @@ -6527,6 +6619,14 @@ + + + + + + + + @@ -6557,6 +6657,15 @@ + + + + + + + + + @@ -6644,7 +6753,17 @@ - + + + + + + + + + + + @@ -6662,16 +6781,25 @@ + + + + + + + + + @@ -6696,18 +6824,33 @@ + + + + + + + + + + + + @@ -6801,11 +6944,15 @@ + + + + @@ -7269,14 +7416,34 @@ + + + + + + + + + + + + + + + + - + - - + + @@ -7286,21 +7453,16 @@ - - - - - - - + + + - @@ -7308,6 +7470,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7859,7 +8046,6 @@ - @@ -7888,7 +8074,6 @@ - @@ -7900,7 +8085,6 @@ - @@ -7936,7 +8120,6 @@ - @@ -8419,7 +8602,6 @@ - @@ -8540,7 +8722,6 @@ - @@ -8554,15 +8735,12 @@ - - - @@ -8572,7 +8750,6 @@ - @@ -8593,21 +8770,18 @@ - - - @@ -8616,7 +8790,6 @@ - @@ -8628,7 +8801,6 @@ - @@ -8637,7 +8809,6 @@ - @@ -8731,7 +8902,6 @@ - @@ -8743,17 +8913,14 @@ - - - @@ -8761,33 +8928,27 @@ - - - - - - @@ -8805,7 +8966,6 @@ - @@ -8815,7 +8975,6 @@ - @@ -8823,14 +8982,9 @@ - - - - - @@ -8859,7 +9013,6 @@ - @@ -9535,7 +9688,6 @@ - @@ -10109,7 +10261,6 @@ - diff --git a/src/vm/ecalllist.h b/src/vm/ecalllist.h index 0b9ab3a..2228c05 100644 --- a/src/vm/ecalllist.h +++ b/src/vm/ecalllist.h @@ -218,9 +218,7 @@ FCFuncStart(gStringFuncs) FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_Char_Int_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorCharCountManaged) FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_RetVoid, COMString::StringInitCharPtr) FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_Int_Int_RetVoid, COMString::StringInitCharPtrPartial) -#ifndef FEATURE_CORECLR FCFuncElementSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_Int_Int_Encoding_RetVoid, COMString::StringInitSBytPtrPartialEx) -#endif // FEATURE_CORECLR FCFuncElement("IsFastSort", COMString::IsFastSort) FCFuncElement("nativeCompareOrdinalIgnoreCaseWC", COMString::FCCompareOrdinalIgnoreCaseWC) FCIntrinsic("get_Length", COMString::Length, CORINFO_INTRINSIC_StringLength) @@ -340,8 +338,8 @@ FCFuncEnd() FCFuncStart(gExceptionFuncs) FCFuncElement("IsImmutableAgileException", ExceptionNative::IsImmutableAgileException) FCFuncElement("nIsTransient", ExceptionNative::IsTransient) -#ifndef FEATURE_CORECLR FCFuncElement("GetMethodFromStackTrace", SystemNative::GetMethodFromStackTrace) +#ifndef FEATURE_CORECLR FCFuncElement("StripFileInfo", ExceptionNative::StripFileInfo) #endif QCFuncElement("GetMessageFromNativeResources", ExceptionNative::GetMessageFromNativeResources) @@ -1548,8 +1546,8 @@ FCFuncStart(gBufferFuncs) FCFuncEnd() FCFuncStart(gGCInterfaceFuncs) -#ifndef FEATURE_CORECLR FCFuncElement("GetGenerationWR", GCInterface::GetGenerationWR) +#ifndef FEATURE_CORECLR FCFuncElement("_RegisterForFullGCNotification", GCInterface::RegisterForFullGCNotification) FCFuncElement("_CancelFullGCNotification", GCInterface::CancelFullGCNotification) FCFuncElement("_WaitForFullGCApproach", GCInterface::WaitForFullGCApproach) -- 2.7.4