From ab55bf3ed3389ecfd542abbc9496f15c06fdc4f2 Mon Sep 17 00:00:00 2001 From: jules Ivanic Date: Tue, 18 Jul 2023 13:26:20 +0400 Subject: [PATCH] Add more Netty configs Come from: - https://github.com/oracle/graal/issues/2050#issuecomment-797689154 - https://github.com/oracle/graal/issues/2050#issuecomment-997282641 --- build.sbt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 323f81f..7e10b4f 100644 --- a/build.sbt +++ b/build.sbt @@ -105,8 +105,24 @@ lazy val cli = // "-H:+BuildReport", // only available on Oracle GraalVM "-H:ExcludeResources=.*.jar,.*.properties", "-Djdk.http.auth.tunneling.disabledSchemes=", - "--initialize-at-run-time=io.netty.handler.ssl.BouncyCastleAlpnSslUtils", - ) + ) ++ Seq( + """ + |io.netty.handler.ssl.BouncyCastleAlpnSslUtils + |io.netty.channel.epoll.Epoll + |io.netty.channel.epoll.Native + |io.netty.channel.epoll.EpollEventLoop + |io.netty.channel.epoll.EpollEventArray + |io.netty.channel.DefaultFileRegion + |io.netty.channel.kqueue.KQueueEventArray + |io.netty.channel.kqueue.KQueueEventLoop + |io.netty.channel.kqueue.KQueue + |io.netty.channel.kqueue.Native + |io.netty.channel.unix.Errors + |io.netty.channel.unix.IovArray + |io.netty.channel.unix.Limits + |io.netty.util.internal.logging.Log4JLogger + |""".stripMargin.trim.split('\n').map(c => s"--initialize-at-run-time=$c").mkString(",") + ) }, nativeImageAgentMerge := true, nativeImageOptions += s"-H:ConfigurationFileDirectories=${(Compile / resourceDirectory).value}/META-INF/native-image",