Skip to content

Commit b08610b

Browse files
author
Todd Fiala
committed
Error out on invalid LLDB build configurations on OS X.
https://bugs.swift.org/browse/SR-18
1 parent 37428f7 commit b08610b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

utils/build-script

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,27 @@ placed""",
604604
build_script_impl_inferred_args += [
605605
"--skip-build-lldb"
606606
]
607+
else:
608+
import platform
609+
if platform.system() == "Darwin":
610+
# Validate the LLDB build variant, exiting the
611+
# build if it is not supported.
612+
supported_variants = [
613+
"Debug",
614+
"Release"
615+
]
616+
if args.lldb_build_variant is not None:
617+
lldb_build_variant = args.lldb_build_variant
618+
else:
619+
lldb_build_variant = args.build_variant
620+
if lldb_build_variant not in supported_variants:
621+
sys.stderr.write(
622+
"The Swift LLDB build does not support build variant %s\n"
623+
% lldb_build_variant)
624+
sys.stderr.write(
625+
"Please select one of the following variants: %s\n" %
626+
", ".join(supported_variants))
627+
sys.exit(1)
607628

608629
if not args.build_llbuild:
609630
build_script_impl_inferred_args += [

0 commit comments

Comments
 (0)