Skip to content
Permalink
Browse files

Merge pull request #37878 from jaredpar/fix-il

Move to new ilasm version
  • Loading branch information...
jaredpar committed Aug 12, 2019
2 parents 2ac72ce + 3061d12 commit 52b72faa842a0305161c1ec4c8e863daafea69f6
Showing with 73 additions and 120 deletions.
  1. +0 −7 Compilers.sln
  2. +0 −7 Roslyn.sln
  3. +5 −2 eng/Versions.props
  4. +32 −0 eng/targets/ILTools.targets
  5. +1 −0 src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
  6. +1 −0 src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
  7. +1 −0 src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
  8. +1 −0 src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
  9. +1 −0 src/Compilers/CSharp/Test/WinRT/Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests.csproj
  10. +1 −0 src/Compilers/VisualBasic/Test/Emit/Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests.vbproj
  11. +1 −0 src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
  12. +1 −0 src/Compilers/VisualBasic/Test/Symbol/Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests.vbproj
  13. +1 −0 src/EditorFeatures/CSharpTest/Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests.csproj
  14. +1 −0 .../CSharp/Test/ExpressionCompiler/Microsoft.CodeAnalysis.CSharp.ExpressionCompiler.UnitTests.csproj
  15. +1 −0 ...valuator/CSharp/Test/ResultProvider/Microsoft.CodeAnalysis.CSharp.ResultProvider.UnitTests.csproj
  16. +1 −0 ...sionEvaluator/Core/Test/FunctionResolver/Microsoft.CodeAnalysis.FunctionResolver.UnitTests.csproj
  17. +1 −0 ...ic/Test/ExpressionCompiler/Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler.UnitTests.vbproj
  18. +1 −0 ...isualBasic/Test/ResultProvider/Microsoft.CodeAnalysis.VisualBasic.ResultProvider.UnitTests.vbproj
  19. +1 −0 src/Test/Utilities/Portable/Assert/ConditionalFactAttribute.cs
  20. +21 −21 src/Test/Utilities/Portable/Metadata/IlasmUtilities.cs
  21. +0 −7 src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj
  22. +0 −76 src/Tools/ILTools/ILTools.proj
@@ -142,8 +142,6 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CSharpAnalyzerDriver", "src
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "BasicAnalyzerDriver", "src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.shproj", "{E8F0BAA5-7327-43D1-9A51-644E81AE55F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILAsm", "src\Tools\ILTools\ILTools.proj", "{46B3E63A-C462-4133-9F27-3B85DA5E7D37}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packages", "Packages", "{274B96B7-F815-47E3-9CA4-4024A57A478F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NETCore.Compilers.Package", "src\NuGet\Microsoft.NETCore.Compilers\Microsoft.NETCore.Compilers.Package.csproj", "{15FEBD1B-55CE-4EBD-85E3-04898260A25B}"
@@ -405,10 +403,6 @@ Global
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Release|Any CPU.Build.0 = Release|Any CPU
{46B3E63A-C462-4133-9F27-3B85DA5E7D37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46B3E63A-C462-4133-9F27-3B85DA5E7D37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46B3E63A-C462-4133-9F27-3B85DA5E7D37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46B3E63A-C462-4133-9F27-3B85DA5E7D37}.Release|Any CPU.Build.0 = Release|Any CPU
{15FEBD1B-55CE-4EBD-85E3-04898260A25B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15FEBD1B-55CE-4EBD-85E3-04898260A25B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15FEBD1B-55CE-4EBD-85E3-04898260A25B}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -506,7 +500,6 @@ Global
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510} = {B20208C3-D3A6-4020-A274-6BE3786D29FB}
{54E08BF5-F819-404F-A18D-0AB9EA81EA04} = {32A48625-F0AD-419D-828B-A50BDABA38EA}
{E8F0BAA5-7327-43D1-9A51-644E81AE55F1} = {C65C6143-BED3-46E6-869E-9F0BE6E84C37}
{46B3E63A-C462-4133-9F27-3B85DA5E7D37} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{15FEBD1B-55CE-4EBD-85E3-04898260A25B} = {274B96B7-F815-47E3-9CA4-4024A57A478F}
{27B1EAE2-2E06-48EF-8A67-06D6FB3DC275} = {274B96B7-F815-47E3-9CA4-4024A57A478F}
{E0756C89-603F-4B48-8E64-1D53E62654C8} = {274B96B7-F815-47E3-9CA4-4024A57A478F}
@@ -342,8 +342,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Edit
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnalyzerRunner", "src\Tools\AnalyzerRunner\AnalyzerRunner.csproj", "{60166C60-813C-46C4-911D-2411B4ABBC0F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILTools", "src\Tools\ILTools\ILTools.proj", "{DA8522ED-02BC-499C-AC71-1DF884F63987}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Debugging.Package", "src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.Package.csproj", "{FC2AE90B-2E4B-4045-9FDD-73D4F5ED6C89}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.PooledObjects.Package", "src\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.Package.csproj", "{49E7C367-181B-499C-AC2E-8E17C81418D6}"
@@ -983,10 +981,6 @@ Global
{60166C60-813C-46C4-911D-2411B4ABBC0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60166C60-813C-46C4-911D-2411B4ABBC0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60166C60-813C-46C4-911D-2411B4ABBC0F}.Release|Any CPU.Build.0 = Release|Any CPU
{DA8522ED-02BC-499C-AC71-1DF884F63987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA8522ED-02BC-499C-AC71-1DF884F63987}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA8522ED-02BC-499C-AC71-1DF884F63987}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA8522ED-02BC-499C-AC71-1DF884F63987}.Release|Any CPU.Build.0 = Release|Any CPU
{FC2AE90B-2E4B-4045-9FDD-73D4F5ED6C89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC2AE90B-2E4B-4045-9FDD-73D4F5ED6C89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC2AE90B-2E4B-4045-9FDD-73D4F5ED6C89}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -1293,7 +1287,6 @@ Global
{2D36C343-BB6A-4CB5-902B-E2145ACCB58F} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{FFB00FB5-8C8C-4A02-B67D-262B9D28E8B1} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}
{60166C60-813C-46C4-911D-2411B4ABBC0F} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{DA8522ED-02BC-499C-AC71-1DF884F63987} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{FC2AE90B-2E4B-4045-9FDD-73D4F5ED6C89} = {C2D1346B-9665-4150-B644-075CF1636BAA}
{49E7C367-181B-499C-AC2E-8E17C81418D6} = {C2D1346B-9665-4150-B644-075CF1636BAA}
{037F06F0-3BE8-42D0-801E-2F74FC380AB8} = {55A62CFA-1155-46F1-ADF3-BEEE51B58AB5}
@@ -24,6 +24,7 @@
<MicrosoftCodeAnalysisTestingVersion>1.0.0-beta1-63310-01</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>3.3.0-beta2-19376-02</CodeStyleAnalyzerVersion>
<VisualStudioEditorPackagesVersion>16.1.101</VisualStudioEditorPackagesVersion>
<ILToolsPackageVersion>5.0.0-alpha1.19409.1</ILToolsPackageVersion>
</PropertyGroup>
<!--
Dependency versions
@@ -72,8 +73,6 @@
<MicrosoftMetadataVisualizerVersion>1.0.0-beta1-63011-01</MicrosoftMetadataVisualizerVersion>
<MicrosoftMSXMLVersion>8.0.0.0-alpha</MicrosoftMSXMLVersion>
<MicrosoftNetCoreAnalyzersVersion>$(RoslynDiagnosticsNugetPackageVersion)</MicrosoftNetCoreAnalyzersVersion>
<MicrosoftNetCoreILAsmVersion>3.0.0-preview6-27721-71</MicrosoftNetCoreILAsmVersion>
<MicrosoftNetCoreILDasmVersion>3.0.0-preview6-27721-71</MicrosoftNetCoreILDasmVersion>
<MicrosoftNETCorePlatformsVersion>2.1.2</MicrosoftNETCorePlatformsVersion>
<MicrosoftNETTestSdkVersion>16.0.1</MicrosoftNETTestSdkVersion>
<MicrosoftNETCoreTestHostVersion>1.1.0</MicrosoftNETCoreTestHostVersion>
@@ -216,6 +215,10 @@
<MicrosoftCodeAnalysisCSharpWorkspacesFixedVersion>$(CodeStyleLayerCodeAnalysisVersion)</MicrosoftCodeAnalysisCSharpWorkspacesFixedVersion>
<MicrosoftCodeAnalysisVisualBasicFixedVersion>$(CodeStyleLayerCodeAnalysisVersion)</MicrosoftCodeAnalysisVisualBasicFixedVersion>
<MicrosoftCodeAnalysisVisualBasicWorkspacesFixedVersion>$(CodeStyleLayerCodeAnalysisVersion)</MicrosoftCodeAnalysisVisualBasicWorkspacesFixedVersion>

<runtimeWinX64MicrosoftNETCoreILAsmPackageVersion>$(ILToolsPackageVersion)</runtimeWinX64MicrosoftNETCoreILAsmPackageVersion>
<runtimeLinuxX64MicrosoftNETCoreILAsmPackageVersion>$(ILToolsPackageVersion)</runtimeLinuxX64MicrosoftNETCoreILAsmPackageVersion>
<runtimeOSXX64MicrosoftNETCoreILAsmPackageVersion>$(ILToolsPackageVersion)</runtimeOSXX64MicrosoftNETCoreILAsmPackageVersion>
</PropertyGroup>
<!--
The following packages are considered implementation details and will not be included
@@ -0,0 +1,32 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<!--
This logic is adding the ILASM executable to the runtime directory of all projects that
include this target file. Several of our projects compile IL on the fly and need this
exe.
-->
<ItemGroup>
<Content Include="$(NuGetPackageRoot)\runtime.win-x64.microsoft.netcore.ilasm\$(runtimeWinX64MicrosoftNETCoreILAsmPackageVersion)\runtimes\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LinkBase>runtimes</LinkBase>
<Visible>false</Visible>
<Pack>false</Pack>
</Content>
<Content Include="$(NuGetPackageRoot)\runtime.linux-x64.microsoft.netcore.ilasm\$(runtimeLinuxX64MicrosoftNETCoreILAsmPackageVersion)\runtimes\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LinkBase>runtimes</LinkBase>
<Visible>false</Visible>
<Pack>false</Pack>
</Content>
<Content Include="$(NuGetPackageRoot)\runtime.osx-x64.microsoft.netcore.ilasm\$(runtimeOSXX64MicrosoftNETCoreILAsmPackageVersion)\runtimes\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LinkBase>runtimes</LinkBase>
<Visible>false</Visible>
<Pack>false</Pack>
</Content>

<PackageReference Include="runtime.win-x64.Microsoft.NETCore.ILAsm" Version="$(runtimeWinX64MicrosoftNETCoreILAsmPackageVersion)" ExcludeAssets="all" />
<PackageReference Include="runtime.linux-x64.Microsoft.NETCore.ILAsm" Version="$(runtimeLinuxX64MicrosoftNETCoreILAsmPackageVersion)" ExcludeAssets="all" />
<PackageReference Include="runtime.osx-x64.Microsoft.NETCore.ILAsm" Version="$(runtimeOSXX64MicrosoftNETCoreILAsmPackageVersion)" ExcludeAssets="all" />
</ItemGroup>
</Project>
@@ -41,4 +41,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -22,4 +22,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -22,4 +22,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -20,4 +20,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -22,4 +22,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -186,4 +186,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -94,4 +94,5 @@
<Compile Remove="Semantics\OverloadResolutionTestSource.vb" />
<Compile Remove="Semantics\PrintResultTestSource.vb" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -32,4 +32,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -79,4 +79,5 @@
<Compile Remove="ReorderParameters\ReorderParametersTests.InvocationErrors.cs" />
<Compile Remove="ReorderParameters\ReorderParametersTests.InvocationLocation.cs" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -30,4 +30,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -32,4 +32,5 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\Source\ResultProvider\CSharpResultProvider.projitems" Label="Shared" />
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -26,4 +26,5 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine-implementation" Version="$(MicrosoftVisualStudioDebuggerEngineimplementationVersion)" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -34,4 +34,5 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -35,4 +35,5 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\Source\ResultProvider\BasicResultProvider.projitems" Label="Shared" />
<Import Project="$(RepositoryEngineeringDir)targets\ILTools.targets" />
</Project>
@@ -154,6 +154,7 @@ public static class ExecutionConditionUtil
public static bool IsWindows => Path.DirectorySeparatorChar == '\\';
public static bool IsUnix => !IsWindows;
public static bool IsMacOS => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
public static bool IsDesktop => RuntimeUtilities.IsDesktopRuntime;
public static bool IsWindowsDesktop => IsWindows && IsDesktop;
public static bool IsMonoDesktop => Type.GetType("Mono.Runtime") != null;
@@ -23,34 +23,34 @@ private static string GetIlasmPath()
{
if (ExecutionConditionUtil.IsWindowsDesktop)
{
// The destkop ilasm is still necessary because a number of our tests depend on being able to
// emit PDB files for net modules. That feature is not available on coreclr ilasm.
return Path.Combine(
Path.GetDirectoryName(RuntimeUtilities.GetAssemblyLocation(typeof(object))),
"ilasm.exe");
}

var ilasmExeName = PlatformInformation.IsWindows ? "ilasm.exe" : "ilasm";
var directory = Path.GetDirectoryName(RuntimeUtilities.GetAssemblyLocation(typeof(RuntimeUtilities)));
string ridName;
if (ExecutionConditionUtil.IsWindows)
{
ridName = "win-x64";
}
else if (ExecutionConditionUtil.IsMacOS)
{
ridName = "osx-x64";
}
else if (ExecutionConditionUtil.IsLinux)
{
ridName = "linux-x64";
}
else
{
var ilasmExeName = PlatformInformation.IsWindows ? "ilasm.exe" : "ilasm";

var directory = Path.GetDirectoryName(RuntimeUtilities.GetAssemblyLocation(typeof(RuntimeUtilities)));
string path = null;
#if DEBUG
const string configuration = "Debug";
#else
const string configuration = "Release";
#endif

while (directory != null && !File.Exists(path = Path.Combine(directory, "artifacts", "tools", "ILTools", configuration, ilasmExeName)))
{
directory = Path.GetDirectoryName(directory);
}

if (directory == null)
{
throw new NotSupportedException("Unable to find CoreCLR ilasm tool. Has the Microsoft.NETCore.ILAsm package been published to /artifacts/tools?");
}

return path;
throw new PlatformNotSupportedException("Runtime platform not supported for testing");
}

return Path.Combine(directory, "runtimes", ridName, "native", ilasmExeName);
}

private static readonly string IlasmPath = GetIlasmPath();
@@ -13,13 +13,6 @@
<ProjectReference Include="..\..\..\Compilers\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.csproj" />
<ProjectReference Include="..\..\..\Compilers\VisualBasic\Portable\Microsoft.CodeAnalysis.VisualBasic.vbproj" />

<!--
Reference ILAsm deploy project to make sure it's built since we need its outputs, but not reference the outputs themselves.
Note SkipGetTargetFrameworkProperties makes it possible to reference project with incompatible TFM.
GlobalPropertiesToRemove makes sure TargetFramework isn't set as a global property for the target project.
-->
<ProjectReference Include="..\..\..\Tools\ILTools\ILTools.proj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" GlobalPropertiesToRemove="TargetFramework" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />

</ItemGroup>
<ItemGroup>
<!-- Needed to find the Unsafe.dll binary to lay out at runtime for the compiler when testing analyzers. -->

This file was deleted.

0 comments on commit 52b72fa

Please sign in to comment.
You can’t perform that action at this time.