Skip to content

Commit fe3763b

Browse files
committed
build-script-helper: print-target-info error
Capture output on failure when unable to run `-print-target-info` in the build-script helper. The old behavior only emitted the command line and the exit code, which doesn't provide enough information in logs to be actionable.
1 parent 0764248 commit fe3763b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,9 @@ def get_build_target(swiftc_path, args, cross_compile=False):
580580
if '-apple-macosx' in args.target_info["target"]["unversionedTriple"]:
581581
triple = args.target_info['target']['unversionedTriple']
582582
return triple
583+
except subprocess.CalledProcessError as e:
584+
error(f"""Command {e.cmd} terminated with non-zero exit status {e.returncode}
585+
Output: {e.output}""")
583586
except Exception as e:
584587
error(str(e))
585588

0 commit comments

Comments
 (0)