-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: binary options #4974
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
base: master
Are you sure you want to change the base?
feat: binary options #4974
Conversation
|
||
```kotlin | ||
kotlin { | ||
iosX64("ios") { |
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.
Why are we using renaming here?
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.
oh, thank you! I simplified the example
e510793
to
ee0c924
Compare
for example: | ||
|
||
```bash | ||
kotlinc-native main.kt -Xbinary=enableSafepointSignposts=true tracking-pauses |
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.
Guess tracking-pauses
should be removed?
kotlin { | ||
iosArm64 { | ||
binaries { | ||
executable { |
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.
Nitpick: framework
makes more sense.
@@ -0,0 +1,301 @@ | |||
[//]: # (title: Kotlin/Native binary options) | |||
|
|||
This page lists helpful Kotlin/Native binary options that you can use to configure Kotlin/Native projects and the ways |
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.
Minor: we can add a warning that the list of binary options might not be exhaustive.
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.
Right, added a note before the table
@@ -0,0 +1,301 @@ | |||
[//]: # (title: Kotlin/Native binary options) | |||
|
|||
This page lists helpful Kotlin/Native binary options that you can use to configure Kotlin/Native projects and the ways |
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.
to configure Kotlin/Native projects
to configure Kotlin/Native final binaries? https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-build-native-binaries.html
<td> | ||
<list> | ||
<li><code>libbacktrace</code></li> | ||
<li><code>coresymbolication</code></li> |
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.
coresymbolication is enabled by default for macOS and Apple simulators in debug mode. Don't know how to put it shortly :/
<li><code>noop</code> (default)</li> | ||
</list> | ||
</td> | ||
<td>Controls stack trace generation. <code>libbacktrace</code> enables better stack traces with file locations and line numbers.</td> |
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.
Better to put it like this:
libbacktrace and coresymbolication add file locations and line numbers to exception stack traces. coresymbolication is available only for apple targets.
<li><code>disabled</code> (default)</li> | ||
</list> | ||
</td> | ||
<td>Controls timer-based invocation of the garbage collector. When <code>enabled</code>, GC is called only when memory consumption becomes too high.</td> |
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.
It turns off a timer-based invocation of the garbage collector when the application is in the background, so GC is called only when memory consumption becomes too high.
Background part is important here.
<list> | ||
<li><a href="native-memory-manager.md" anchor="optimize-gc-performance"><code>cms</code></a></li> | ||
<li><a href="native-memory-manager.md" anchor="disable-garbage-collection"><code>noop</code></a></li> | ||
<li><code>stms</code> (default)</li> |
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.
No such thing as stms
. There are:
stwms
- plain and simple Stop the World Mark and Sweep.pmcs
(default) — Parallel Mark Concurrent Sweep.
<tr> | ||
<td><code>preCodegenInlineThreshold</code></td> | ||
<td><code>UInt</code></td> | ||
<td>Configures the inlining optimization pass, which comes before the actual code generation phase. The recommended number of tokens is 40.</td> |
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.
Configures the inlining optimization pass, which comes before the actual code generation phase.
Configures Kotlin IR inline optimization pass.
Also worth noting that it is disabled by default.
Thank you, overall looks good to me! |
No description provided.