From 92a72111fe2d7c130c6fd233c2d9fca7d6b84ec1 Mon Sep 17 00:00:00 2001 From: Simon Parten Date: Fri, 20 Sep 2024 01:01:07 +0200 Subject: [PATCH] Forward javacOptions to JMH (#3578) I believe this to be a solution for #3576 . However, I'm unclear how I could effectively test it. Feedback welcomed. --- contrib/jmh/src/mill/contrib/jmh/JmhModule.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/jmh/src/mill/contrib/jmh/JmhModule.scala b/contrib/jmh/src/mill/contrib/jmh/JmhModule.scala index 597efea84ed..27f71e6b81d 100644 --- a/contrib/jmh/src/mill/contrib/jmh/JmhModule.scala +++ b/contrib/jmh/src/mill/contrib/jmh/JmhModule.scala @@ -72,7 +72,7 @@ trait JmhModule extends JavaModule { def generateBenchmarkSources = Task { val dest = T.ctx().dest - + val javacOpts = javacOptions().toSeq val sourcesDir = dest / "jmh_sources" val resourcesDir = dest / "jmh_resources" @@ -89,7 +89,8 @@ trait JmhModule extends JavaModule { sourcesDir.toString, resourcesDir.toString, "default" - ) + ), + jvmArgs = javacOpts ) (sourcesDir, resourcesDir)