@@ -187,10 +187,12 @@ fun Project.jvmArguments(appRun: Boolean = false, headless: Boolean = true) = bu
187187 " -XX:+PrintCommandLineFlags" ,
188188 " --enable-native-access=ALL-UNNAMED" ,
189189 " --illegal-native-access=warn" ,
190+ // "--sun-misc-unsafe-memory-access=warn",
190191 " -Xmx128M" ,
191192 " -XX:+UseZGC" ,
192193 " -XX:+UseStringDeduplication" ,
193194 " -XX:+UnlockExperimentalVMOptions" ,
195+ " -XX:+UseCompactObjectHeaders" ,
194196 " -XX:MaxRAMPercentage=0.8" ,
195197 // "-XX:+UseEpsilonGC",
196198 // "-XX:+AlwaysPreTouch",
@@ -242,6 +244,7 @@ fun Project.jvmArguments(appRun: Boolean = false, headless: Boolean = true) = bu
242244 " -Djava.security.egd=file:/dev/./urandom" ,
243245 " -Djdk.includeInExceptions=hostInfo,jar" ,
244246 " -Dkotlinx.coroutines.debug" ,
247+ " -Djdk.incubator.vector.VECTOR_ACCESS_OOB_CHECK=0" ,
245248 " -Dcom.sun.management.jmxremote" ,
246249 " -Dcom.sun.management.jmxremote.local.only=false" ,
247250 " -Dcom.sun.management.jmxremote.port=9898" ,
@@ -259,7 +262,6 @@ fun Project.jvmArguments(appRun: Boolean = false, headless: Boolean = true) = bu
259262 // "-XshowSettings:system",
260263 // "-XshowSettings:properties",
261264 // "--show-module-resolution",
262- // "-XX:+UseCompactObjectHeaders",
263265 // "-XX:+ShowHiddenFrames",
264266 // "-verbose:module",
265267 // "-XX:ConcGCThreads=2",
@@ -390,29 +392,31 @@ fun KotlinCommonCompilerOptions.configureKotlinCommon(project: Project) =
390392 apiVersion = kotlinApiVersion
391393 languageVersion = kotlinLangVersion
392394 progressiveMode = true
395+ extraWarnings = false
393396 allWarningsAsErrors = false
394397 suppressWarnings = false
395398 verbose = false
396399 freeCompilerArgs.addAll(
397400 " -Xexpect-actual-classes" ,
398401 " -Xskip-prerelease-check" ,
402+ " -Xwhen-guards" ,
403+ " -Xmulti-dollar-interpolation" ,
404+ " -Xnon-local-break-continue" ,
399405 // "-XXLanguage:+ExplicitBackingFields",
400406 // "-Xsuppress-version-warnings",
401407 // "-P",
402408 // "plugin:...=..."
403409 )
404410 optIn.addAll(
405411 " kotlin.ExperimentalStdlibApi" ,
406- " kotlin.contracts.ExperimentalContracts" ,
407412 " kotlin.ExperimentalUnsignedTypes" ,
413+ " kotlin.contracts.ExperimentalContracts" ,
408414 " kotlin.io.encoding.ExperimentalEncodingApi" ,
409415 " kotlin.time.ExperimentalTime" ,
410416 " kotlinx.coroutines.ExperimentalCoroutinesApi" ,
411417 " kotlinx.serialization.ExperimentalSerializationApi" ,
412418 " kotlin.ExperimentalMultiplatform" ,
413419 " kotlin.js.ExperimentalJsExport" ,
414- " kotlin.experimental.ExperimentalNativeApi" ,
415- " kotlinx.cinterop.ExperimentalForeignApi" ,
416420 " kotlin.uuid.ExperimentalUuidApi" ,
417421 // "org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi",
418422 )
@@ -430,6 +434,7 @@ fun KspAATask.configureKspConfig() =
430434
431435/* *
432436 * JVM backend compiler options can be found in,
437+ * - [CommonCompilerArgs](https://github.com/JetBrains/kotlin/blob/master/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt)
433438 * - [K2JVMCompilerArguments.kt](https://github.com/JetBrains/kotlin/blob/master/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt)
434439 * - [JvmTarget.kt](https://github.com/JetBrains/kotlin/blob/master/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmTarget.kt)
435440 * - [ApiVersion.kt](https://github.com/JetBrains/kotlin/blob/master/compiler/util/src/org/jetbrains/kotlin/config/ApiVersion.kt#L35)
0 commit comments