From c0642feb5a79a3f3d65eba860320d8a5d6352102 Mon Sep 17 00:00:00 2001 From: Nordin Abouzahra Date: Tue, 12 Jan 2021 14:34:08 +0000 Subject: [PATCH] Bug 1684291 - Correct generation of dependentlibs.list when using llvm-readelf. r=mhentges Call strip on the returned output to account for the whitespace differing between llvm-readelf and GNU's readelf, also update the tmp variable index to account for stripping the leading whitespace. Differential Revision: https://phabricator.services.mozilla.com/D101459 --- toolkit/library/build/dependentlibs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/library/build/dependentlibs.py b/toolkit/library/build/dependentlibs.py index 67b0bf3ec329..974f5d7a70b9 100644 --- a/toolkit/library/build/dependentlibs.py +++ b/toolkit/library/build/dependentlibs.py @@ -55,8 +55,8 @@ def dependentlibs_readelf(lib): # or with BSD readelf: # tag TYPE value # Looking for NEEDED type entries - tmp = line.split(" ", 3) - if len(tmp) > 3 and "NEEDED" in tmp[2]: + tmp = line.strip().split(" ", 3) + if len(tmp) > 3 and "NEEDED" in tmp[1]: # NEEDED lines look like: # 0x00000001 (NEEDED) Shared library: [libname] # or with BSD readelf: