mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
Support --strong when running dartk from test.py.
BUG= R=kmillikin@google.com Review URL: https://codereview.chromium.org/2536143003 .
This commit is contained in:
parent
440813c67b
commit
04c66f8bab
1 changed files with 12 additions and 8 deletions
|
@ -94,7 +94,8 @@ abstract class CompilerConfiguration {
|
||||||
return ComposedCompilerConfiguration.createDartKConfiguration(
|
return ComposedCompilerConfiguration.createDartKConfiguration(
|
||||||
isHostChecked: isHostChecked,
|
isHostChecked: isHostChecked,
|
||||||
useSdk: useSdk,
|
useSdk: useSdk,
|
||||||
verify: verifyKernel);
|
verify: verifyKernel,
|
||||||
|
strong: isStrong);
|
||||||
case 'dartkp':
|
case 'dartkp':
|
||||||
return ComposedCompilerConfiguration.createDartKPConfiguration(
|
return ComposedCompilerConfiguration.createDartKPConfiguration(
|
||||||
isHostChecked: isHostChecked,
|
isHostChecked: isHostChecked,
|
||||||
|
@ -102,7 +103,8 @@ abstract class CompilerConfiguration {
|
||||||
useBlobs: useBlobs,
|
useBlobs: useBlobs,
|
||||||
isAndroid: configuration['system'] == 'android',
|
isAndroid: configuration['system'] == 'android',
|
||||||
useSdk: useSdk,
|
useSdk: useSdk,
|
||||||
verify: verifyKernel);
|
verify: verifyKernel,
|
||||||
|
strong: isStrong);
|
||||||
case 'none':
|
case 'none':
|
||||||
return new NoneCompilerConfiguration(
|
return new NoneCompilerConfiguration(
|
||||||
isDebug: isDebug,
|
isDebug: isDebug,
|
||||||
|
@ -215,9 +217,10 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
|
||||||
|
|
||||||
/// The "dartk" compiler.
|
/// The "dartk" compiler.
|
||||||
class DartKCompilerConfiguration extends CompilerConfiguration {
|
class DartKCompilerConfiguration extends CompilerConfiguration {
|
||||||
final bool verify;
|
final bool verify, strong;
|
||||||
|
|
||||||
DartKCompilerConfiguration({bool isHostChecked, bool useSdk, this.verify})
|
DartKCompilerConfiguration({bool isHostChecked, bool useSdk, this.verify,
|
||||||
|
this.strong})
|
||||||
: super._subclass(isHostChecked: isHostChecked, useSdk: useSdk);
|
: super._subclass(isHostChecked: isHostChecked, useSdk: useSdk);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -236,6 +239,7 @@ class DartKCompilerConfiguration extends CompilerConfiguration {
|
||||||
'$buildDir/patched_sdk',
|
'$buildDir/patched_sdk',
|
||||||
'--link',
|
'--link',
|
||||||
'--target=vm',
|
'--target=vm',
|
||||||
|
strong ? '--strong' : null,
|
||||||
verify ? '--verify-ir' : null,
|
verify ? '--verify-ir' : null,
|
||||||
'--out',
|
'--out',
|
||||||
outputFileName
|
outputFileName
|
||||||
|
@ -367,13 +371,13 @@ class ComposedCompilerConfiguration extends CompilerConfiguration {
|
||||||
|
|
||||||
static ComposedCompilerConfiguration createDartKPConfiguration(
|
static ComposedCompilerConfiguration createDartKPConfiguration(
|
||||||
{bool isHostChecked, String arch, bool useBlobs, bool isAndroid,
|
{bool isHostChecked, String arch, bool useBlobs, bool isAndroid,
|
||||||
bool useSdk, bool verify}) {
|
bool useSdk, bool verify, bool strong}) {
|
||||||
var nested = [];
|
var nested = [];
|
||||||
|
|
||||||
// Compile with dartk.
|
// Compile with dartk.
|
||||||
nested.add(new PipelineCommand.runWithGlobalArguments(
|
nested.add(new PipelineCommand.runWithGlobalArguments(
|
||||||
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
|
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
|
||||||
useSdk: useSdk, verify: verify)));
|
useSdk: useSdk, verify: verify, strong: strong)));
|
||||||
|
|
||||||
// Run the normal precompiler.
|
// Run the normal precompiler.
|
||||||
nested.add(new PipelineCommand.runWithPreviousKernelOutput(
|
nested.add(new PipelineCommand.runWithPreviousKernelOutput(
|
||||||
|
@ -384,13 +388,13 @@ class ComposedCompilerConfiguration extends CompilerConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
static ComposedCompilerConfiguration createDartKConfiguration(
|
static ComposedCompilerConfiguration createDartKConfiguration(
|
||||||
{bool isHostChecked, bool useSdk, bool verify}) {
|
{bool isHostChecked, bool useSdk, bool verify, bool strong}) {
|
||||||
var nested = [];
|
var nested = [];
|
||||||
|
|
||||||
// Compile with dartk.
|
// Compile with dartk.
|
||||||
nested.add(new PipelineCommand.runWithGlobalArguments(
|
nested.add(new PipelineCommand.runWithGlobalArguments(
|
||||||
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
|
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
|
||||||
useSdk: useSdk, verify: verify)));
|
useSdk: useSdk, verify: verify, strong: strong)));
|
||||||
|
|
||||||
return new ComposedCompilerConfiguration(nested, isPrecompiler: false);
|
return new ComposedCompilerConfiguration(nested, isPrecompiler: false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue