From 3a755c530ee6241541357ecd0dbbce4964bbe4ec Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Thu, 30 May 2024 14:33:09 +0200 Subject: [PATCH] bugfix: Don't add -release flag if target is already present The flags should not be used together and might cause unexpected issues --- backend/src/main/scala/bloop/Compiler.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/scala/bloop/Compiler.scala b/backend/src/main/scala/bloop/Compiler.scala index 39e7e32c7f..c37aff4276 100644 --- a/backend/src/main/scala/bloop/Compiler.scala +++ b/backend/src/main/scala/bloop/Compiler.scala @@ -639,7 +639,8 @@ object Compiler { def existsReleaseSetting = scalacOptions.exists(opt => opt.startsWith("-release") || opt.startsWith("--release") || - opt.startsWith("-java-output-version") + opt.startsWith("-java-output-version") || + opt.startsWith("-Xtarget") ) def sameHome = javacBin match { case Some(bin) => bin.getParent.getParent == JavaRuntime.home