| Index: buildbot/scripts/slave/compile.py
|
| ===================================================================
|
| --- buildbot/scripts/slave/compile.py (revision 60688)
|
| +++ buildbot/scripts/slave/compile.py (working copy)
|
| @@ -37,13 +37,20 @@
|
| def main_xcode(options, args):
|
| """Interprets options, clobbers object files, and calls xcodebuild.
|
| """
|
| + compiler = options.compiler
|
| + assert compiler in (None, 'clang')
|
| +
|
| # Note: this clobbers all targets, not just Debug or Release.
|
| + build_output_dir = os.path.join(os.path.dirname(options.build_dir),
|
| + 'xcodebuild')
|
| + if compiler == 'clang':
|
| + build_output_dir = os.path.join(os.path.dirname(options.build_dir),
|
| + 'clang')
|
| +
|
| if options.clobber:
|
| - build_output_dir = os.path.join(os.path.dirname(options.build_dir),
|
| - 'xcodebuild')
|
| chromium_utils.RemoveDirectory(build_output_dir)
|
|
|
| - # If the project isn't in args, add all.xcodeproj so simplify configuration.
|
| + # If the project isn't in args, add all.xcodeproj to simplify configuration.
|
| command = ['xcodebuild', '-configuration', options.target]
|
|
|
| # TODO(mmoss) Support the old 'args' usage until we're confident the master is
|
| @@ -96,6 +103,15 @@
|
| env['DISTCC_HOSTS'] = 'dummy,cpp,lzo'
|
| command.insert(0, "pump")
|
|
|
| + if compiler == 'clang':
|
| + env['CC'] = 'clang++'
|
| + env['DSTROOT'] = os.path.abspath(build_output_dir)
|
| + env['OBJROOT'] = os.path.join(env['DSTROOT'], 'obj')
|
| + env['SYMROOT'] = os.path.join(env['DSTROOT'], 'sym')
|
| +
|
| + if options.xcode_target:
|
| + command.extend(['-target', options.xcode_target])
|
| +
|
| # Add on any remaining args
|
| command.extend(args)
|
|
|
| @@ -465,6 +481,10 @@
|
| # For linux to arm cross compile.
|
| option_parser.add_option('', '--crosstool', default=None,
|
| help='optional path to crosstool toolset')
|
| + if chromium_utils.IsMac():
|
| + # Mac only.
|
| + option_parser.add_option('', '--xcode-target', default=None,
|
| + help='Target from the xcodeproj file')
|
|
|
| options, args = option_parser.parse_args()
|
|
|
|
|