mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
build-script: Build lldb with CMake on Darwin
build-script can already build lldb on Darwin using its Xcode project, but it's useful to support the CMake build as well. The CMake build allows incremental rebuilds with build-script. I expect this to significantly cut down on iteration time. Taking advantage of CMake also lets lldb piggyback on existing support for sanitizers -- or exciting new build configurations we don't know about yet -- without having to update the Xcode project file. rdar://problem/36751944
This commit is contained in:
@@ -53,7 +53,8 @@ def _apply_default_arguments(args):
|
||||
|
||||
# Build LLDB if any LLDB-related options were specified.
|
||||
if args.lldb_build_variant is not None or \
|
||||
args.lldb_assertions is not None:
|
||||
args.lldb_assertions is not None or \
|
||||
args.lldb_build_with_xcode is not None:
|
||||
args.build_lldb = True
|
||||
|
||||
# Set the default build variant.
|
||||
@@ -75,6 +76,9 @@ def _apply_default_arguments(args):
|
||||
if args.lldb_build_variant is None:
|
||||
args.lldb_build_variant = args.build_variant
|
||||
|
||||
if args.lldb_build_with_xcode is None:
|
||||
args.lldb_build_with_xcode = '1'
|
||||
|
||||
if args.foundation_build_variant is None:
|
||||
args.foundation_build_variant = args.build_variant
|
||||
|
||||
@@ -568,6 +572,14 @@ def create_argument_parser():
|
||||
const='Debug',
|
||||
help='build the Debug variant of LLDB')
|
||||
|
||||
option('--lldb-build-with-xcode', store('lldb_build_with_xcode'),
|
||||
const='1',
|
||||
help='build LLDB using xcodebuild, if possible')
|
||||
|
||||
option('--lldb-build-with-cmake', store('lldb_build_with_xcode'),
|
||||
const='0',
|
||||
help='build LLDB using CMake')
|
||||
|
||||
option('--debug-cmark', store('cmark_build_variant'),
|
||||
const='Debug',
|
||||
help='build the Debug variant of CommonMark')
|
||||
|
||||
Reference in New Issue
Block a user