Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Side by Side Diff: tools/build.py

Issue 2622543002: build.py should only use target 'All' on xcode (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import re 10 import re
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 build_config = utils.GetBuildConf(mode, arch, target_os) 448 build_config = utils.GetBuildConf(mode, arch, target_os)
449 if not options.gyp: 449 if not options.gyp:
450 args = BuildNinjaCommand(options, target, target_os, mode, arch) 450 args = BuildNinjaCommand(options, target, target_os, mode, arch)
451 else: 451 else:
452 os.environ['DART_BUILD_MODE'] = mode 452 os.environ['DART_BUILD_MODE'] = mode
453 if HOST_OS == 'macos': 453 if HOST_OS == 'macos':
454 filter_xcodebuild_output = True 454 filter_xcodebuild_output = True
455 project_file = 'dart.xcodeproj' 455 project_file = 'dart.xcodeproj'
456 if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()): 456 if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()):
457 project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName() 457 project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName()
458 if target == 'all':
459 target == 'All'
Leaf 2017/01/09 11:57:18 Shouldn't this be single equals?
Bill Hesse 2017/01/09 12:14:57 Yes.
Bill Hesse 2017/01/09 12:15:22 Done.
458 args = ['xcodebuild', 460 args = ['xcodebuild',
459 '-project', 461 '-project',
460 project_file, 462 project_file,
461 '-target', 463 '-target',
462 target, 464 target,
463 '-configuration', 465 '-configuration',
464 build_config, 466 build_config,
465 'SYMROOT=%s' % os.path.abspath('xcodebuild') 467 'SYMROOT=%s' % os.path.abspath('xcodebuild')
466 ] 468 ]
467 elif HOST_OS == 'win32': 469 elif HOST_OS == 'win32':
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 def Main(): 585 def Main():
584 utils.ConfigureJava() 586 utils.ConfigureJava()
585 # Parse the options. 587 # Parse the options.
586 parser = BuildOptions() 588 parser = BuildOptions()
587 (options, args) = parser.parse_args() 589 (options, args) = parser.parse_args()
588 if not ProcessOptions(options, args): 590 if not ProcessOptions(options, args):
589 parser.print_help() 591 parser.print_help()
590 return 1 592 return 1
591 # Determine which targets to build. By default we build the "all" target. 593 # Determine which targets to build. By default we build the "all" target.
592 if len(args) == 0: 594 if len(args) == 0:
593 if HOST_OS == 'macos': 595 targets = ['all']
594 targets = ['All']
595 else:
596 targets = ['all']
597 else: 596 else:
598 targets = args 597 targets = args
599 598
600 # Build all targets for each requested configuration. 599 # Build all targets for each requested configuration.
601 for target in targets: 600 for target in targets:
602 for target_os in options.os: 601 for target_os in options.os:
603 for mode in options.mode: 602 for mode in options.mode:
604 for arch in options.arch: 603 for arch in options.arch:
605 cross_build = utils.IsCrossBuild(target_os, arch) 604 cross_build = utils.IsCrossBuild(target_os, arch)
606 if target in ['create_sdk'] and cross_build: 605 if target in ['create_sdk'] and cross_build:
607 if BuildCrossSdk(options, target_os, mode, arch) != 0: 606 if BuildCrossSdk(options, target_os, mode, arch) != 0:
608 return 1 607 return 1
609 else: 608 else:
610 if BuildOneConfig(options, target, target_os, 609 if BuildOneConfig(options, target, target_os,
611 mode, arch, cross_build) != 0: 610 mode, arch, cross_build) != 0:
612 return 1 611 return 1
613 612
614 return 0 613 return 0
615 614
616 615
617 if __name__ == '__main__': 616 if __name__ == '__main__':
618 sys.exit(Main()) 617 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698