Skip to content

Commit

Permalink
Merge osxarm64
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Aug 9, 2023
2 parents b2e6eb9 + 392168f commit 20cb1e4
Show file tree
Hide file tree
Showing 21 changed files with 207 additions and 95 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/IKVM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ jobs:
with:
version: "16.0"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install apple-codesign
uses: actions-rs/[email protected]
with:
crate: apple-codesign
version: latest
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
Expand Down Expand Up @@ -486,6 +491,9 @@ jobs:
- run: IKVM.Tests
tfm: net7.0
sys: linux
- run: IKVM.Tests
tfm: net7.0
sys: osx-x64
- run: IKVM.Tools.Exporter.Tests
tfm: net472
sys: windows
Expand All @@ -501,6 +509,9 @@ jobs:
- run: IKVM.Tools.Tests
tfm: net7.0
sys: linux
- run: IKVM.Tools.Tests
tfm: net7.0
sys: osx-x64
name: Test (${{ matrix.run }}:${{ matrix.tfm }}:${{ matrix.sys }})
needs:
- build-ikvm
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Prerequisites for building the project:
* The Linux SDK contains a version for all of the required platforms. These are required to cross compile to each supported platform. They must all be present.
* LLVM installed with `clang` available on the path. LLVM is shipped with Visual Studio, but you will need to update your PATH to include the relevant bin directory (typically: `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\bin`) or you can install a [standalone distribution of LLVM](https://releases.llvm.org/). If building on Windows, ensure you do not build within the Visual Studio Developer Command Prompt as clang is unable to properly discover the Windows SDK when this is applied.
* 200GB of free disk space
* If building the OS X libraries or binaries (on by default) the 'rcodesign' utility is required for ad-hoc signing. This utility allows one to sign executables for Mac OS X from within Windows or Linux. It is available from the Rust crate named 'apple-codesign'. For more information, see https://gregoryszorc.com/docs/apple-codesign/0.22.0/.

Once the prerequisites are in place, to build IKVM from the command line you will use the following commands:

Expand Down
1 change: 1 addition & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
</ItemGroup>

<Import Project="targets\ClangProjectReference.targets" />
<Import Project="targets\DotNetOSXCodeSign.targets"/>

</Project>
4 changes: 2 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ branches:
develop:
regex: ^develop$
tag: dev
increment: Patch

increment: Minor

64 changes: 33 additions & 31 deletions IKVM.deps.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,40 @@
<ItemGroup>
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" GeneratePathProperty="true" />
<PackageReference Include="Mono.Posix" Version="7.1.0-final.1.21458.1" GeneratePathProperty="true" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net461'))">
<Reference Include="System.Configuration" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Security" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Text.Json" Version="6.0.6" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Data.Odbc" Version="6.0.0" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Primitives" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.3" />
<PackageReference Include="System.Security.AccessControl" Version="6.0.0" />
<PackageReference Include="System.Security.Permissions" Version="6.0.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="System.Threading.AccessControl" Version="6.0.0" />
</ItemGroup>
<Choose>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net461'))">
<ItemGroup>
<Reference Include="System.Configuration" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Security" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Text.Json" Version="6.0.6" />
</ItemGroup>
</When>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Data.Odbc" Version="6.0.0" />
</ItemGroup>
</When>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Data.Odbc" Version="6.0.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
</ItemGroup>
</When>
</Choose>

</Project>
2 changes: 2 additions & 0 deletions IKVM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,10 @@ Project("{6DE1C62B-E8D7-451A-8734-87EAEB46E35B}") = "libjvm", "src\libjvm\libjvm
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "targets", "targets", "{F63A2815-ABCA-442F-BE92-CD2802F3EA0A}"
ProjectSection(SolutionItems) = preProject
targets\ClangOSXCodeSign.targets = targets\ClangOSXCodeSign.targets
targets\ClangProjectReference.targets = targets\ClangProjectReference.targets
targets\lib.props = targets\lib.props
targets\DotNetOSXCodeSign.targets = targets\DotNetOSXCodeSign.targets
targets\lib.targets = targets\lib.targets
targets\openjdk.lib.props = targets\openjdk.lib.props
targets\openjdk.lib.targets = targets\openjdk.lib.targets
Expand Down
3 changes: 2 additions & 1 deletion src/IKVM.MSBuild.Tasks/IkvmTaskException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace IKVM.MSBuild.Tasks
/// <summary>
/// Generic IKVM task exception.
/// </summary>
[Serializable]
class IkvmTaskException : Exception
{

Expand Down Expand Up @@ -43,4 +44,4 @@ protected IkvmTaskException(SerializationInfo info, StreamingContext context) :

}

}
}
3 changes: 2 additions & 1 deletion src/IKVM.MSBuild.Tasks/IkvmTaskMessageException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace IKVM.MSBuild.Tasks
/// <summary>
/// IKVM task exception with error message.
/// </summary>
[Serializable]
class IkvmTaskMessageException : IkvmTaskException
{

Expand Down Expand Up @@ -76,4 +77,4 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont

}

}
}
1 change: 1 addition & 0 deletions src/IKVM.MSBuild.Tests/Project/Exe/ProjectExe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;net48;net6.0</TargetFrameworks>
<TargetFrameworks>net461;net472;net48;net6.0</TargetFrameworks>
<RuntimeIdentifiers>win7-x86;win7-x64;win81-arm;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64</RuntimeIdentifiers>
<PlatformTarget Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">AnyCPU</PlatformTarget>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/IKVM.MSBuild.Tests/Project/Lib/ProjectLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<PropertyGroup>
<TargetFrameworks>net472;net48;net6.0</TargetFrameworks>
<TargetFrameworks>net461;net472;net48;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/IKVM.MSBuild.Tests/ProjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public void Can_build_test_project()
("net6.0", "osx-arm64"),
};

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
targets = new[]
{
Expand Down
4 changes: 2 additions & 2 deletions src/IKVM.NET.Sdk.Tests/ProjectTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Linq;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
using System.Xml.Linq;

Expand Down Expand Up @@ -121,7 +120,8 @@ public void Can_build_test_project()
("net6.0", "osx-arm64"),
};

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
targets = new[]
{
Expand Down
Loading

0 comments on commit 20cb1e4

Please sign in to comment.