From f32b66c1f62b61b2692c2fcb672cd80d98320e57 Mon Sep 17 00:00:00 2001 From: Kouji Matsui Date: Sun, 24 Oct 2021 17:41:20 +0900 Subject: [PATCH 1/2] Added feature of verifying IL on building process. --- .../ILSupport.Standard.targets | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets b/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets index 784567ff..bfe63504 100644 --- a/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets +++ b/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets @@ -12,27 +12,34 @@ <_runtime>$(NETCoreSdkPortableRuntimeIdentifier) <_runtime Condition="'$(_runtime)' == ''">$(NETCoreSdkRuntimeIdentifier) $(_runtime) + - 6.0.0-rc.2.21480.5 + 6.0.0-rc.2.21480.5 + 5.0.0 + runtime.$(MicrosoftNetCoreIlasmPackageRuntimeId).microsoft.netcore.ilasm runtime.$(MicrosoftNetCoreIlasmPackageRuntimeId).microsoft.netcore.ildasm + dotnet-ilverify <_IlasmDir Condition="'$(ILAsmToolPath)' != ''">$([MSBuild]::NormalizeDirectory($(ILAsmToolPath))) <_IldasmDir Condition="'$(ILAsmToolPath)' != ''">$([MSBuild]::NormalizeDirectory($(ILAsmToolPath))) + <_IlverifyDir Condition="'$(ILAsmToolPath)' != ''">$([MSBuild]::NormalizeDirectory($(ILAsmToolPath))) $(CoreCompileDependsOn);ResolveIlAsmToolPaths - <_IlasmPackageReference Include="$(MicrosoftNetCoreIlasmPackageName)" Version="$(MicrosoftNETCoreILAsmVersion)" /> - <_IldasmPackageReference Include="$(MicrosoftNetCoreIldasmPackageName)" Version="$(MicrosoftNETCoreILAsmVersion)" /> - + <_IlasmPackageReference Include="$(MicrosoftNetCoreIlasmPackageName)" Version="$(MicrosoftNETCoreToolingVersion)" /> + <_IldasmPackageReference Include="$(MicrosoftNetCoreIldasmPackageName)" Version="$(MicrosoftNETCoreToolingVersion)" /> + <_IlverifyPackageReference Include="$(MicrosoftNetCoreIlverifyPackageName)" Version="$(ILVerifyPackageVersion)" /> + + @@ -40,16 +47,21 @@ <_IlasmSourceFiles Include="%(_IlasmPackageReference.NativePath)\**\*" /> <_IldasmPackageReference NativePath="$(NuGetPackageRoot)\%(Identity)\%(Version)\runtimes\$(MicrosoftNetCoreIlasmPackageRuntimeId)\native" /> <_IldasmSourceFiles Include="%(_IldasmPackageReference.NativePath)\**\*" /> + <_IlverifyPackageReference AssemblyPath="$(NuGetPackageRoot)\%(Identity)\%(Version)\tools\netcoreapp3.1\any" /> + <_IlverifySourceFiles Include="%(_IlverifyPackageReference.AssemblyPath)\**\*" /> + <_IlasmDir Condition="'$(_IlasmDir)' == '' and '%(_IlasmPackageReference.Identity)' == '$(MicrosoftNetCoreIlasmPackageName)'">%(_IlasmPackageReference.NativePath)/ <_IldasmDir Condition="'$(_IldasmDir)' == '' and '%(_IldasmPackageReference.Identity)' == '$(MicrosoftNetCoreIldasmPackageName)'">%(_IldasmPackageReference.NativePath)/ + <_IlverifyDir Condition="'$(_IlverifyDir)' == '' and '%(_IlverifyPackageReference.Identity)' == '$(MicrosoftNetCoreIlverifyPackageName)'">%(_IlverifyPackageReference.AssemblyPath)/ $([System.IO.Path]::Combine('$(_IlasmDir)','ilasm')) $([System.IO.Path]::Combine('$(_IldasmDir)','ildasm')) + $([System.IO.Path]::Combine('$(_IlverifyDir)','ILVerify.dll')) @@ -60,14 +72,16 @@ Because will cause too long command line arguments coming from a lot of decompiled file paths. --> - + + @(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).il', ' ') @(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).res', ' ') + @@ -93,6 +107,7 @@ + @@ -160,4 +175,16 @@ + + + + @(IntermediateAssembly->'"%(FullPath)"', ' ') + @(ReferencePath->'"%(FullPath)"', ' ') + + + + + From a0fc4f83a7f50acaf3394845c73b9930bbe76619 Mon Sep 17 00:00:00 2001 From: Kouji Matsui Date: Sun, 24 Oct 2021 17:55:57 +0900 Subject: [PATCH 2/2] Added log. --- tests/IL2C.Core.Test.Common/ILSupport.Standard.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets b/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets index bfe63504..93586523 100644 --- a/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets +++ b/tests/IL2C.Core.Test.Common/ILSupport.Standard.targets @@ -173,7 +173,7 @@ - + @@ -185,6 +185,7 @@ +