Skip to content

Commit afbcd8f

Browse files
committed
remove triple flag
1 parent 00c1f4b commit afbcd8f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Utilities/bootstrap

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ def add_build_args(parser):
144144
dest="cross_compile_hosts",
145145
help="List of cross compile hosts targets.",
146146
default=[])
147-
parser.add_argument(
148-
"--cross-compile-target-triple",
149-
help="Swift cross-compilation target triple")
150147
parser.add_argument(
151148
"--cross-compile-config",
152149
help="Swift flags to cross-compile SPM with itself")
@@ -285,11 +282,12 @@ def get_ninja_path(args):
285282
return call_output(["which", "ninja"], verbose=args.verbose)
286283

287284
def get_build_target(args, cross_compile=False):
288-
"""Returns the target-triple of the current machine."""
285+
"""Returns the target-triple of the current machine or for cross-compilation."""
289286
try:
290287
command = [args.swiftc_path, '-print-target-info']
291288
if cross_compile:
292-
command += ['-target', args.cross_compile_target_triple]
289+
cross_compile_json = json.load(open(args.cross_compile_config))
290+
command += ['-target', cross_compile_json["target"]]
293291
target_info_json = subprocess.check_output(command,
294292
stderr=subprocess.PIPE, universal_newlines=True).strip()
295293
args.target_info = json.loads(target_info_json)

0 commit comments

Comments
 (0)