Add -X argument to disable generation of @SourceDebugExtension

This will be used in tests in the subsequent commit.
This commit is contained in:
Alexander Udalov
2022-07-17 02:22:11 +02:00
parent 87d3ce6ded
commit 7dad47cd76
31 changed files with 62 additions and 55 deletions
@@ -431,6 +431,12 @@ Also sets `-jvm-target` value equal to the selected JDK version"""
)
var noUnifiedNullChecks: Boolean by FreezableVar(false)
@Argument(
value = "-Xno-source-debug-extension",
description = "Do not generate @kotlin.jvm.internal.SourceDebugExtension annotation on a class with the copy of SMAP"
)
var noSourceDebugExtension: Boolean by FreezableVar(false)
@Argument(
value = "-Xprofile",
valueDescription = "<profilerPath:command:outputDir>",
@@ -193,11 +193,11 @@ public class StubClassBuilder extends AbstractClassBuilder {
}
@Override
public void done() {
public void done(boolean generateSmapCopyToAnnotation) {
if (!isPackageClass) {
StubElement pop = parentStack.pop();
assert pop == v.getResult() : "parentStack: got " + pop + ", expected " + v.getResult();
}
super.done();
super.done(generateSmapCopyToAnnotation);
}
}
@@ -307,6 +307,7 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr
put(JVMConfigurationKeys.NO_KOTLIN_NOTHING_VALUE_EXCEPTION, arguments.noKotlinNothingValueException)
put(JVMConfigurationKeys.NO_RESET_JAR_TIMESTAMPS, arguments.noResetJarTimestamps)
put(JVMConfigurationKeys.NO_UNIFIED_NULL_CHECKS, arguments.noUnifiedNullChecks)
put(JVMConfigurationKeys.NO_SOURCE_DEBUG_EXTENSION, arguments.noSourceDebugExtension)
put(JVMConfigurationKeys.SERIALIZE_IR, JvmSerializeIrMode.fromString(arguments.serializeIr))