-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce ENSO_LAUNCHER env var to configure behavior of buildEngineDistribution #12035
Changes from all commits
e5fe541
4eb938e
fb9e94d
a1797c2
d74a02e
2500d80
538e41f
c3eace8
d958a24
318c786
4eefff4
987e175
ee64c65
c6edc0d
19fee71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,16 @@ import scala.sys.process._ | |
|
||
object NativeImage { | ||
|
||
/** Specifies whether the build executable should include debug symbols. | ||
* Should be set to false for production builds. May work only on Linux. | ||
*/ | ||
private val includeDebugInfo: Boolean = false | ||
|
||
lazy val smallJdk = taskKey[Option[File]]("Location of a minimal JDK") | ||
lazy val additionalCp = | ||
taskKey[Seq[String]]( | ||
"Additional class-path entries to be added to the native image" | ||
) | ||
|
||
lazy val additionalOpts = settingKey[Seq[String]]( | ||
"Additional options for the native-image tool" | ||
) | ||
|
||
/** List of classes that should be initialized at build time by the native image. | ||
* Note that we strive to initialize as much classes during the native image build | ||
* time as possible, as this reduces the time needed to start the native image. | ||
|
@@ -143,9 +142,6 @@ object NativeImage { | |
|
||
} | ||
|
||
val debugParameters = | ||
if (includeDebugInfo) Seq("-H:GenerateDebugInfo=1") else Seq() | ||
|
||
val (staticParameters, pathExts) = | ||
if (staticOnLinux && Platform.isLinux) { | ||
// Note [Static Build On Linux] | ||
|
@@ -169,9 +165,6 @@ object NativeImage { | |
Seq() | ||
} | ||
|
||
val quickBuildOption = | ||
if (BuildInfo.isReleaseMode) Seq() else Seq("-Ob") | ||
|
||
val buildMemoryLimitOptions = | ||
buildMemoryLimitMegabytes.map(megs => s"-J-Xmx${megs}M").toSeq | ||
|
||
|
@@ -202,15 +195,16 @@ object NativeImage { | |
|
||
var args: Seq[String] = | ||
Seq("-cp", cpStr) ++ | ||
quickBuildOption ++ | ||
debugParameters ++ staticParameters ++ configs ++ | ||
staticParameters ++ | ||
configs ++ | ||
Seq("--no-fallback", "--no-server") ++ | ||
Seq("-march=compatibility") ++ | ||
initializeAtBuildtimeOptions ++ | ||
initializeAtRuntimeOptions ++ | ||
buildMemoryLimitOptions ++ | ||
runtimeMemoryOptions ++ | ||
additionalOptions ++ | ||
additionalOpts.value ++ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bit. One is a parameter to the method, and the other one is a value from the task. I don't know now how to merge these two, with minimal changes. |
||
Seq("-o", targetLoc.toString) | ||
|
||
args = mainClass match { | ||
|
@@ -306,7 +300,7 @@ object NativeImage { | |
else | ||
Def.task { | ||
streams.value.log.info( | ||
s"No source changes, $artifactName Native Image is up to date." | ||
s"No source changes, $name Native Image is up to date." | ||
) | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check line 283: