Skip to content

Commit

Permalink
Add libsctp on Linux.
Browse files Browse the repository at this point in the history
Fix some headers.
  • Loading branch information
wasabii committed May 3, 2024
1 parent e1ceec4 commit 31d8b52
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions IKVM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ Project("{6DE1C62B-E8D7-451A-8734-87EAEB46E35B}") = "libjsoundds", "src\libjsoun
EndProject
Project("{6DE1C62B-E8D7-451A-8734-87EAEB46E35B}") = "libosxapp", "src\libosxapp\libosxapp.clangproj", "{0E068B20-9C99-45C5-8D94-A1FF9EDD6739}"
EndProject
Project("{6DE1C62B-E8D7-451A-8734-87EAEB46E35B}") = "libsctp", "src\libsctp\libsctp.clangproj", "{D6D8258D-456A-4C72-ABA1-1CABC37D471F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -826,6 +828,10 @@ Global
{0E068B20-9C99-45C5-8D94-A1FF9EDD6739}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E068B20-9C99-45C5-8D94-A1FF9EDD6739}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E068B20-9C99-45C5-8D94-A1FF9EDD6739}.Release|Any CPU.Build.0 = Release|Any CPU
{D6D8258D-456A-4C72-ABA1-1CABC37D471F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6D8258D-456A-4C72-ABA1-1CABC37D471F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6D8258D-456A-4C72-ABA1-1CABC37D471F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6D8258D-456A-4C72-ABA1-1CABC37D471F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions src/IKVM.Image-bin/IKVM.Image-bin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<DotNetClangProjectReference Include="$(MSBuildThisFileDirectory)..\libjsound\libjsound.clangproj" SupportedRuntimes="win-x64;win-x86;win-arm64;linux-arm;linux-arm64;linux-x64;linux-musl-arm;linux-musl-arm64;linux-musl-x64" />
<DotNetClangProjectReference Include="$(MSBuildThisFileDirectory)..\libjsoundds\libjsoundds.clangproj" SupportedRuntimes="win-x64;win-x86;win-arm64" />
<DotNetClangProjectReference Include="$(MSBuildThisFileDirectory)..\libjsoundalsa\libjsoundalsa.clangproj" SupportedRuntimes="linux-arm;linux-arm64;linux-x64;linux-musl-arm;linux-musl-arm64;linux-musl-x64" />
<DotNetClangProjectReference Include="$(MSBuildThisFileDirectory)..\libsctp\libsctp.clangproj" SupportedRuntimes="linux-arm;linux-arm64;linux-x64;linux-musl-arm;linux-musl-arm64;linux-musl-x64" />
</ItemGroup>

<Target Name="GetDotNetClangProjectReferencesByRuntime" Inputs="@(DotNetClangProjectReference)" Outputs="%(DotNetClangProjectReference.Identity)\null" BeforeTargets="AssignClangProjectConfiguration">
Expand Down
2 changes: 2 additions & 0 deletions src/libiava/libiava.clangproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<ProjectReference Include="..\libjvm\libjvm.clangproj" />
</ItemGroup>
<ItemGroup>
<Header Include="$(OpenJdkDir)jdk\src\share\native\common\*.h" />
<Header Include="$(OpenJdkDir)jdk\src\$(OpenJdkTargetOsApiDir)\native\common\*.h" />
<PreprocessorDefinitions Include="ARCHPROPNAME" Value="&quot;$(OpenJdkTargetCpuOsArch)&quot;" />
<LibJavaDirs Include="$(OpenJdkDir)jdk\src\$(OpenJdkTargetOsApiDir)\native\java\lang" />
<LibJavaDirs Include="$(OpenJdkDir)jdk\src\share\native\java\lang" />
Expand Down
2 changes: 2 additions & 0 deletions src/libnet/libnet.clangproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<ProjectReference Include="..\libiava\libiava.clangproj" />
</ItemGroup>
<ItemGroup>
<Header Include="$(OpenJdkDir)jdk\src\share\native\java\net\*.h" />
<Header Include="$(OpenJdkDir)jdk\src\$(OpenJdkTargetOsApiDir)\native\java\net\*.h" />
<AdditionalCompileOptions Include="-Wno-int-conversion" />
<LibNetDirs Include="$(OpenJdkDir)jdk\src\share\native\java\net" />
<LibNetDirs Include="$(OpenJdkDir)jdk\src\$(OpenJdkTargetOsApiDir)\native\java\net" />
Expand Down
2 changes: 2 additions & 0 deletions src/libnio/libnio.clangproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<ProjectReference Include="..\libnet\libnet.clangproj" />
</ItemGroup>
<ItemGroup>
<Header Include="$(OpenJdkDir)jdk\src\share\native\sun\nio\ch\*.h" />
<Header Include="$(OpenJdkDir)jdk\src\$(OpenJdkTargetOsApiDir)\native\sun\nio\ch\*.h" />
<PreprocessorDefinitions Include="_Included_java_lang_Long" />
<PreprocessorDefinitions Include="java_lang_Long_serialVersionUID" Value="4290774380558885855LL" />
<PreprocessorDefinitions Include="java_lang_Long_MIN_VALUE" Value="-9223372036854775808LL" />
Expand Down
30 changes: 30 additions & 0 deletions src/libsctp/libsctp.clangproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project>
<Import Sdk="IKVM.Clang.Sdk" Project="Sdk.props" />
<Import Project="$(MSBuildThisFileDirectory)..\..\targets\openjdk.lib.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>d6d8258d-456a-4c72-aba1-1cabc37d471f</ProjectGuid>
</PropertyGroup>
<PropertyGroup>
<TargetName>sctp</TargetName>
<OutputType>dll</OutputType>
<TargetIdentifiers>linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64</TargetIdentifiers>
<LanguageStandard>c99</LanguageStandard>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\libjvm\libjvm.clangproj" />
<ProjectReference Include="..\libiava\libiava.clangproj" />
<ProjectReference Include="..\libnet\libnet.clangproj" />
<ProjectReference Include="..\libnio\libnio.clangproj" />
</ItemGroup>
<ItemGroup>
<IncludeDirectories Include="$(OpenJdkDir)jdk\src\share\native\sun\nio\ch\sctp" />
<AdditionalCompileOptions Include="-fcommon" />
<AdditionalLinkOptions Include="-fcommon" />
<Compile Include="$(OpenJdkDir)jdk\src\solaris\native\sun\nio\ch\sctp\**\*.c" />
</ItemGroup>
<ItemGroup Condition="$(TargetIdentifier.StartsWith('linux-'))">
<Dependencies Include="pthread" />
</ItemGroup>
<Import Sdk="IKVM.Clang.Sdk" Project="Sdk.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\targets\openjdk.lib.targets" />
</Project>

0 comments on commit 31d8b52

Please sign in to comment.