diff --git a/tools/building.py b/tools/building.py index 779c8e1c123c0..5ff9f46c6a3c6 100644 --- a/tools/building.py +++ b/tools/building.py @@ -575,6 +575,9 @@ def parse_llvm_nm_symbols(output): filename_pos = entry_pos filename = line[:filename_pos] + if entry_pos + 14 >= len(line): + exit_with_error('error parsing output of llvm-nm: `%s`\nIf the symbol name here contains a colon, and starts with __invoke_, then the object file was likely built with and old version of llvm.' % line) + status = line[entry_pos + 11] # Skip address, which is always fixed-length 8 chars. symbol = line[entry_pos + 13:]