Skip to content

Commit 0de50a2

Browse files
authored
Add some debugging for emcc --cflags failures. NFC (#20923)
1 parent 9464cae commit 0de50a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

emcc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,8 @@ def run(args):
565565
print(proc.stderr)
566566
exit_with_error('error getting cflags')
567567
lines = [x for x in proc.stderr.splitlines() if clang in x and input_file in x]
568+
if not lines:
569+
exit_with_error(f'unable to parse output of `{cmd}`:\n{proc.stderr}')
568570
parts = shlex.split(lines[0].replace('\\', '\\\\'))
569571
parts = [x for x in parts if x not in ['-c', '-o', '-v', '-emit-llvm'] and input_file not in x and temp_target not in x]
570572
print(shared.shlex_join(parts[1:]))

0 commit comments

Comments
 (0)