From bb5868234f8c1003ceb943cdc39f5e94efb50328 Mon Sep 17 00:00:00 2001 From: AliveDevil Date: Tue, 23 Jul 2024 13:10:55 +0200 Subject: [PATCH] Add static compiler-flag --- src/IKVM.NET.Sdk/targets/IKVM.Java.Core.NoTasks.targets | 1 + src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets | 3 ++- src/IKVM.NET.Sdk/targets/IKVM.NET.Sdk.props | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.NoTasks.targets b/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.NoTasks.targets index f937f4ab57..2531c6268f 100644 --- a/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.NoTasks.targets +++ b/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.NoTasks.targets @@ -293,6 +293,7 @@ Value = b.ToString(); <_IkvmCompilerArgs Include="-sharedclassloader" Condition=" '$(SharedClassLoader)' == 'true' " /> <_IkvmCompilerArgs Include="-w$(WarningLevel)" /> <_IkvmCompilerArgs Include="-noparameterreflection" Condition=" '$(NoParameterReflection)' == 'true' " /> + <_IkvmCompilerArgs Include="-static" Condition=" '$(CompileStatically)' == 'true' " /> <_IkvmCompilerArgs Include="-exclude:$([System.IO.Path]::GetFullPath('$(_ExcludeFilePath)'))" Condition="Exists('$(_ExcludeFilePath)') And '@(ExcludeRegex)' != '' " /> <_IkvmCompilerArgs Include="@(_AssemblyAttributesClass->'-assemblyattributes:%(FullPath)')" /> <_IkvmCompilerReferencePath Remove="@(_IkvmCompilerReferencePath)" /> diff --git a/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets b/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets index f0106ab7ba..205fc4e0b8 100644 --- a/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets +++ b/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets @@ -139,7 +139,8 @@ RemoveAssertions="$(RemoveAssertions)" Resources="@(_IkvmCompilerResource)" Remap="@(MapFile)" - Input="@(_Convert)" /> + Input="@(_Convert)" + Static="$(CompileStatically)" /> diff --git a/src/IKVM.NET.Sdk/targets/IKVM.NET.Sdk.props b/src/IKVM.NET.Sdk/targets/IKVM.NET.Sdk.props index e007dcb58a..57f2e9a742 100644 --- a/src/IKVM.NET.Sdk/targets/IKVM.NET.Sdk.props +++ b/src/IKVM.NET.Sdk/targets/IKVM.NET.Sdk.props @@ -26,6 +26,7 @@ true true true + false