mirror of https://github.com/sbt/sbt.git
Merge pull request #7108 from mkurz/sbtn-aarch64
[1.8.x] Prepare aarch64 support for sbtn binary
This commit is contained in:
commit
e529c9a3a1
|
|
@ -4,6 +4,7 @@ import com.typesafe.tools.mima.core.ProblemFilters._
|
||||||
import com.typesafe.tools.mima.core._
|
import com.typesafe.tools.mima.core._
|
||||||
import local.Scripted
|
import local.Scripted
|
||||||
import java.nio.file.{ Files, Path => JPath }
|
import java.nio.file.{ Files, Path => JPath }
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
import scala.util.Try
|
import scala.util.Try
|
||||||
|
|
||||||
|
|
@ -1146,6 +1147,10 @@ lazy val serverTestProj = (project in file("server-test"))
|
||||||
)
|
)
|
||||||
|
|
||||||
val isWin = scala.util.Properties.isWin
|
val isWin = scala.util.Properties.isWin
|
||||||
|
val isLinux = scala.util.Properties.isLinux
|
||||||
|
val isArmArchitecture: Boolean = sys.props
|
||||||
|
.getOrElse("os.arch", "")
|
||||||
|
.toLowerCase(Locale.ROOT) == "aarch64"
|
||||||
val buildThinClient =
|
val buildThinClient =
|
||||||
inputKey[JPath]("generate a java implementation of the thin client")
|
inputKey[JPath]("generate a java implementation of the thin client")
|
||||||
// Use a TaskKey rather than SettingKey for nativeInstallDirectory so it can left unset by default
|
// Use a TaskKey rather than SettingKey for nativeInstallDirectory so it can left unset by default
|
||||||
|
|
@ -1177,7 +1182,9 @@ lazy val sbtClientProj = (project in file("client"))
|
||||||
"-H:+ReportExceptionStackTraces",
|
"-H:+ReportExceptionStackTraces",
|
||||||
"-H:-ParseRuntimeOptions",
|
"-H:-ParseRuntimeOptions",
|
||||||
s"-H:Name=${target.value / "bin" / "sbtn"}",
|
s"-H:Name=${target.value / "bin" / "sbtn"}",
|
||||||
),
|
) ++ (if (isLinux && isArmArchitecture)
|
||||||
|
Seq("-H:PageSize=65536") // Make sure binary runs on kernels with page size set to 4k, 16 and 64k
|
||||||
|
else Nil),
|
||||||
buildThinClient := {
|
buildThinClient := {
|
||||||
val isFish = Def.spaceDelimited("").parsed.headOption.fold(false)(_ == "--fish")
|
val isFish = Def.spaceDelimited("").parsed.headOption.fold(false)(_ == "--fish")
|
||||||
val ext = if (isWin) ".bat" else if (isFish) ".fish" else ".sh"
|
val ext = if (isWin) ".bat" else if (isFish) ".fish" else ".sh"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
{"pattern":"org/jline/utils/screen.caps"},
|
{"pattern":"org/jline/utils/screen.caps"},
|
||||||
{"pattern":"library.properties"},
|
{"pattern":"library.properties"},
|
||||||
{"pattern":"darwin/x86_64/libsbtipcsocket.dylib"},
|
{"pattern":"darwin/x86_64/libsbtipcsocket.dylib"},
|
||||||
|
{"pattern":"linux/aarch64/libsbtipcsocket.so"},
|
||||||
{"pattern":"linux/x86_64/libsbtipcsocket.so"},
|
{"pattern":"linux/x86_64/libsbtipcsocket.so"},
|
||||||
{"pattern":"win32/x86_64/sbtipcsocket.dll"}
|
{"pattern":"win32/x86_64/sbtipcsocket.dll"}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue