Skip to content

Commit

Permalink
Allow IkvmToolReference to specify a hard coded TFM. Use for javac. T…
Browse files Browse the repository at this point in the history
…his allows javac to run on Unix without Mono.
  • Loading branch information
wasabii committed Mar 21, 2024
1 parent a574f89 commit 74487d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</PropertyGroup>

<ItemGroup>
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\javac-ref\javac-ref.msbuildproj" IsJavaCompiler="true" />
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\javac-ref\javac-ref.msbuildproj" IsJavaCompiler="true" TargetFramework="net8.0" />
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\ikvmc\ikvmc.csproj" IsIkvmCompiler="true" />
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\ikvmstub\ikvmstub.csproj" IsIkvmExporter="true" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<_IkvmToolReferenceToConfigure Include="@(IkvmToolReference)">
<SetTargetFramework>TargetFramework=$(IkvmToolFramework)</SetTargetFramework>
<SetTargetFramework Condition=" '%(IkvmToolReference.TargetFramework)' != '' ">%(IkvmToolReference.TargetFramework)</SetTargetFramework>
<SetRuntimeIdentifier>RuntimeIdentifier=$(IkvmToolRuntime)</SetRuntimeIdentifier>
</_IkvmToolReferenceToConfigure>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/IKVM.MSBuild/buildTransitive/IKVM.MSBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<IkvmToolFramework Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard1.0'))">net8.0</IkvmToolFramework>
<IkvmToolFramework Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net461'))">net472</IkvmToolFramework>
<IkvmToolFramework Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">net8.0</IkvmToolFramework>
<IkvmJavaFramework>net8.0</IkvmJavaFramework>
<IkvmToolRuntime Condition="$([MSBuild]::IsOSPlatform('Windows')) And '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X86'">win-x86</IkvmToolRuntime>
<IkvmToolRuntime Condition="$([MSBuild]::IsOSPlatform('Windows')) And '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">win-x64</IkvmToolRuntime>
<IkvmToolRuntime Condition="$([MSBuild]::IsOSPlatform('Windows')) And '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'ARM64'">win-arm64</IkvmToolRuntime>
Expand Down

0 comments on commit 74487d1

Please sign in to comment.