Ant task: support additional arguments, drop inline/optimize

Only "-X" options are now supported as additional command line arguments
This commit is contained in:
Alexander Udalov
2014-07-30 13:50:20 -07:00
parent 45a57011d8
commit 9442724821
14 changed files with 97 additions and 118 deletions
@@ -100,10 +100,7 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
? CommandLineScriptUtils.scriptParameters()
: Collections.<AnalyzerScriptParameter>emptyList());
configuration.put(JVMConfigurationKeys.DISABLE_CALL_ASSERTIONS, arguments.noCallAssertions);
configuration.put(JVMConfigurationKeys.DISABLE_PARAM_ASSERTIONS, arguments.noParamAssertions);
configuration.put(JVMConfigurationKeys.DISABLE_INLINE, arguments.noInline);
configuration.put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize);
putAdvancedOptions(configuration, arguments);
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector);
@@ -163,6 +160,12 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
}
}
public static void putAdvancedOptions(@NotNull CompilerConfiguration configuration, @NotNull K2JVMCompilerArguments arguments) {
configuration.put(JVMConfigurationKeys.DISABLE_CALL_ASSERTIONS, arguments.noCallAssertions);
configuration.put(JVMConfigurationKeys.DISABLE_PARAM_ASSERTIONS, arguments.noParamAssertions);
configuration.put(JVMConfigurationKeys.DISABLE_INLINE, arguments.noInline);
configuration.put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize);
}
/**
* Allow derived classes to add additional command line arguments