[JS IR] Add to IR keep possibility similar to legacy-dce one
It helps to: - keep declarations even if they are not reachable and not exported - not minify names of not exported declarations Compiler argument: -Xir-keep=A,B Can be used for top-level declarations or for member ^KT-54118 fixed
This commit is contained in:
+7
@@ -100,6 +100,13 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-target", valueDescription = "{ v5 }", description = "Generate JS files for specific ECMA version")
|
||||
var target: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@Argument(
|
||||
value = "-Xir-keep",
|
||||
description = "Comma-separated list of fully-qualified names to not be eliminated by DCE (if it can be reached), " +
|
||||
"and for which to keep non-minified names."
|
||||
)
|
||||
var irKeep: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@GradleOption(
|
||||
value = DefaultValues.JsModuleKinds::class,
|
||||
gradleInputType = GradleInputTypes.INPUT
|
||||
|
||||
Reference in New Issue
Block a user