Skip to content

Commit 93a082b

Browse files
committed
Demote llvm-nm failures from exceptions to logged debug messages, because it can be expected that llvm-nm might fail, and processing that failure is done proper by examining the returncode of the run later, so eagerly stopping the build here is not needed. Fixes #5007.
1 parent 28d43cc commit 93a082b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/shared.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ def parallel_llvm_nm(files):
16201620

16211621
for i in range(len(files)):
16221622
if object_contents[i].returncode != 0:
1623-
raise Exception('llvm-nm failed on file ' + files[i] + ': return code ' + str(object_contents[i].returncode) + ', error: ' + object_contents[i].output)
1623+
logging.debug('llvm-nm failed on file ' + files[i] + ': return code ' + str(object_contents[i].returncode) + ', error: ' + object_contents[i].output)
16241624
Building.uninternal_nm_cache[files[i]] = object_contents[i]
16251625
return object_contents
16261626

@@ -1919,8 +1919,9 @@ def llvm_nm(filename, stdout=PIPE, stderr=PIPE, include_internal=False):
19191919
ret = Building.llvm_nm_uncached(filename, stdout, stderr, include_internal)
19201920

19211921
if ret.returncode != 0:
1922-
raise Exception('llvm-nm failed on file ' + filename + ': return code ' + str(ret.returncode) + ', error: ' + ret.output)
1922+
logging.debug('llvm-nm failed on file ' + filename + ': return code ' + str(ret.returncode) + ', error: ' + ret.output)
19231923

1924+
# Even if we fail, write the results to the NM cache so that we don't keep trying to llvm-nm the failing file again later.
19241925
if include_internal: Building.internal_nm_cache[filename] = ret
19251926
else: Building.uninternal_nm_cache[filename] = ret
19261927

0 commit comments

Comments
 (0)