Skip to content

Commit

Permalink
Enable ComWrappers for NativeAOT on non-Windows (#85000)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed Apr 25, 2023
1 parent ad59672 commit f74138f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/nativeaot/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
<DefineConstants Condition="'$(FeatureCominterop)' == 'true'">FEATURE_COMINTEROP;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<FeatureComWrappers>false</FeatureComWrappers>
<FeatureComWrappers Condition="'$(TargetsWindows)' == 'true'">true</FeatureComWrappers>
<FeatureComWrappers>true</FeatureComWrappers>
</PropertyGroup>
<PropertyGroup>
<FeatureObjCMarshal>false</FeatureObjCMarshal>
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\tests\JSImportGenerator.UnitTest\JSImportGenerator.Unit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Configuration.Binder\tests\SourceGenerationTests\Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests.csproj" />

<!-- Depends on ComWrappers, which is not enabled on NativeAOT on non-Windows. Tracked by #76005 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices\tests\ComInterfaceGenerator.Tests\ComInterfaceGenerator.Tests.csproj"
Condition="'$(TargetOS)' != 'windows'" />

<!-- Many test failures due to trimming and MakeGeneric. XmlSerializer is not currently supported with NativeAOT. Low priority -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.XmlSerializer.Generator\tests\Microsoft.XmlSerializer.Generator.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.ServiceModel.Syndication\tests\System.ServiceModel.Syndication.Tests.csproj" />
Expand Down
1 change: 1 addition & 0 deletions src/tests/Common/CoreCLRTestLibrary/PlatformDetection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TestLibrary
Expand Down
1 change: 1 addition & 0 deletions src/tests/Interop/COM/ComWrappers/API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace ComWrappersTests
using System.Runtime.InteropServices;

using ComWrappersTests.Common;
using TestLibrary;
using Xunit;

class Program
Expand Down
6 changes: 0 additions & 6 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -982,12 +982,6 @@
<ExcludeList Include="$(XunitTestBinBase)/Interop/ArrayMarshalling/SafeArray/SafeArrayTest/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: SAFEARRAY</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/API/ComWrappersTests/*">
<Issue>https://github.com/dotnet/runtime/issues/74620</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/API/ComWrappersTestsBuiltInComDisabled/*">
<Issue>https://github.com/dotnet/runtime/issues/74620</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/WeakReference/WeakReferenceTest/*">
<Issue>https://github.com/dotnet/runtime/issues/74620</Issue>
</ExcludeList>
Expand Down

0 comments on commit f74138f

Please sign in to comment.