| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library compiler_configuration; | 5 library compiler_configuration; |
| 6 | 6 |
| 7 import 'dart:io' show Platform; | 7 import 'dart:io' show Platform; |
| 8 | 8 |
| 9 import 'runtime_configuration.dart' show RuntimeConfiguration; | 9 import 'runtime_configuration.dart' show RuntimeConfiguration; |
| 10 | 10 |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 } | 362 } |
| 363 | 363 |
| 364 CompilationCommand computeCompilationCommand( | 364 CompilationCommand computeCompilationCommand( |
| 365 String tempDir, | 365 String tempDir, |
| 366 String buildDir, | 366 String buildDir, |
| 367 CommandBuilder commandBuilder, | 367 CommandBuilder commandBuilder, |
| 368 List arguments, | 368 List arguments, |
| 369 Map<String, String> environmentOverrides) { | 369 Map<String, String> environmentOverrides) { |
| 370 var exec = "$buildDir/dart_bootstrap"; | 370 var exec = "$buildDir/dart_bootstrap"; |
| 371 var args = new List(); | 371 var args = new List(); |
| 372 args.add("--snapshot=$tempDir"); | |
| 373 args.add("--snapshot-kind=app-aot"); | 372 args.add("--snapshot-kind=app-aot"); |
| 374 if (useBlobs) { | 373 if (useBlobs) { |
| 374 args.add("--snapshot=$tempDir/out.aotsnapshot"); |
| 375 args.add("--use-blobs"); | 375 args.add("--use-blobs"); |
| 376 } else { |
| 377 args.add("--snapshot=$tempDir/out.S"); |
| 376 } | 378 } |
| 377 if (isAndroid && arch == 'arm') { | 379 if (isAndroid && arch == 'arm') { |
| 378 args.add('--no-sim-use-hardfp'); | 380 args.add('--no-sim-use-hardfp'); |
| 379 } | 381 } |
| 380 args.addAll(arguments); | 382 args.addAll(arguments); |
| 381 | 383 |
| 382 return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk, | 384 return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk, |
| 383 bootstrapDependencies(buildDir), exec, args, environmentOverrides); | 385 bootstrapDependencies(buildDir), exec, args, environmentOverrides); |
| 384 } | 386 } |
| 385 | 387 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 cc_flags = "-EL"; | 426 cc_flags = "-EL"; |
| 425 } else { | 427 } else { |
| 426 throw "Architecture not supported: $arch"; | 428 throw "Architecture not supported: $arch"; |
| 427 } | 429 } |
| 428 | 430 |
| 429 var exec = cc; | 431 var exec = cc; |
| 430 var args = (cc_flags != null) ? [ shared, cc_flags ] : [ shared ]; | 432 var args = (cc_flags != null) ? [ shared, cc_flags ] : [ shared ]; |
| 431 args.addAll([ | 433 args.addAll([ |
| 432 '-o', | 434 '-o', |
| 433 '$tempDir/$libname', | 435 '$tempDir/$libname', |
| 434 '$tempDir/snapshot.S' | 436 '$tempDir/out.S' |
| 435 ]); | 437 ]); |
| 436 | 438 |
| 437 return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk, | 439 return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk, |
| 438 bootstrapDependencies(buildDir), exec, args, environmentOverrides); | 440 bootstrapDependencies(buildDir), exec, args, environmentOverrides); |
| 439 } | 441 } |
| 440 | 442 |
| 441 // This step reduces the amount of space needed to run the precompilation | 443 // This step reduces the amount of space needed to run the precompilation |
| 442 // tests by 60%. | 444 // tests by 60%. |
| 443 CompilationCommand computeRemoveAssemblyCommand( | 445 CompilationCommand computeRemoveAssemblyCommand( |
| 444 String tempDir, | 446 String tempDir, |
| 445 String buildDir, | 447 String buildDir, |
| 446 CommandBuilder commandBuilder, | 448 CommandBuilder commandBuilder, |
| 447 List arguments, | 449 List arguments, |
| 448 Map<String, String> environmentOverrides) { | 450 Map<String, String> environmentOverrides) { |
| 449 var exec = 'rm'; | 451 var exec = 'rm'; |
| 450 var args = ['$tempDir/snapshot.S']; | 452 var args = ['$tempDir/out.S']; |
| 451 | 453 |
| 452 return commandBuilder.getCompilationCommand( | 454 return commandBuilder.getCompilationCommand( |
| 453 'remove_assembly', | 455 'remove_assembly', |
| 454 tempDir, | 456 tempDir, |
| 455 !useSdk, | 457 !useSdk, |
| 456 bootstrapDependencies(buildDir), | 458 bootstrapDependencies(buildDir), |
| 457 exec, | 459 exec, |
| 458 args, | 460 args, |
| 459 environmentOverrides); | 461 environmentOverrides); |
| 460 } | 462 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 } | 527 } |
| 526 | 528 |
| 527 CompilationCommand computeCompilationCommand( | 529 CompilationCommand computeCompilationCommand( |
| 528 String tempDir, | 530 String tempDir, |
| 529 String buildDir, | 531 String buildDir, |
| 530 CommandBuilder commandBuilder, | 532 CommandBuilder commandBuilder, |
| 531 List arguments, | 533 List arguments, |
| 532 Map<String, String> environmentOverrides) { | 534 Map<String, String> environmentOverrides) { |
| 533 var exec = "$buildDir/dart_bootstrap"; | 535 var exec = "$buildDir/dart_bootstrap"; |
| 534 var args = new List(); | 536 var args = new List(); |
| 535 args.add("--snapshot=$tempDir"); | 537 args.add("--snapshot=$tempDir/out.jitsnapshot"); |
| 536 args.add("--snapshot-kind=app-after-run"); | 538 args.add("--snapshot-kind=app-after-run"); |
| 537 args.addAll(arguments); | 539 args.addAll(arguments); |
| 538 | 540 |
| 539 return commandBuilder.getCompilationCommand( | 541 return commandBuilder.getCompilationCommand( |
| 540 'dart2snapshot', | 542 'dart2snapshot', |
| 541 tempDir, | 543 tempDir, |
| 542 !useSdk, | 544 !useSdk, |
| 543 bootstrapDependencies(buildDir), | 545 bootstrapDependencies(buildDir), |
| 544 exec, | 546 exec, |
| 545 args, | 547 args, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 : super(isDebug: isDebug, isChecked: isChecked), this.useBlobs = useBlobs; | 587 : super(isDebug: isDebug, isChecked: isChecked), this.useBlobs = useBlobs; |
| 586 | 588 |
| 587 CompilationCommand computeCompilationCommand( | 589 CompilationCommand computeCompilationCommand( |
| 588 String tempDir, | 590 String tempDir, |
| 589 String buildDir, | 591 String buildDir, |
| 590 CommandBuilder commandBuilder, | 592 CommandBuilder commandBuilder, |
| 591 List arguments, | 593 List arguments, |
| 592 Map<String, String> environmentOverrides) { | 594 Map<String, String> environmentOverrides) { |
| 593 var exec = "$buildDir/dart"; | 595 var exec = "$buildDir/dart"; |
| 594 var args = new List(); | 596 var args = new List(); |
| 595 args.add("--snapshot=$tempDir"); | 597 args.add("--snapshot=$tempDir/out.jitsnapshot"); |
| 596 args.add("--snapshot-kind=app-jit-after-run"); | 598 args.add("--snapshot-kind=app-jit-after-run"); |
| 597 if (useBlobs) { | 599 if (useBlobs) { |
| 598 args.add("--use-blobs"); | 600 args.add("--use-blobs"); |
| 599 } | 601 } |
| 600 args.addAll(arguments); | 602 args.addAll(arguments); |
| 601 | 603 |
| 602 return commandBuilder.getCompilationCommand( | 604 return commandBuilder.getCompilationCommand( |
| 603 'dart2snapshot', | 605 'dart2snapshot', |
| 604 tempDir, | 606 tempDir, |
| 605 !useSdk, | 607 !useSdk, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 RuntimeConfiguration runtimeConfiguration, | 670 RuntimeConfiguration runtimeConfiguration, |
| 669 String buildDir, | 671 String buildDir, |
| 670 TestInformation info, | 672 TestInformation info, |
| 671 List<String> vmOptions, | 673 List<String> vmOptions, |
| 672 List<String> sharedOptions, | 674 List<String> sharedOptions, |
| 673 List<String> originalArguments, | 675 List<String> originalArguments, |
| 674 CommandArtifact artifact) { | 676 CommandArtifact artifact) { |
| 675 return <String>[]; | 677 return <String>[]; |
| 676 } | 678 } |
| 677 } | 679 } |
| OLD | NEW |