aboutsummaryrefslogtreecommitdiff
path: root/symbolextractor.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-06-07 20:22:05 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-06-07 20:22:05 +0300
commitd4cfc5d2ccddc3b226f6baeab9658c06c118dfef (patch)
treefd54a62823ab8b33772f4d40b877c9f6fed4eeb3 /symbolextractor.py
parented61e6f19a84bfd295cfa6928804b5accc65f821 (diff)
downloadmeson-d4cfc5d2ccddc3b226f6baeab9658c06c118dfef.zip
meson-d4cfc5d2ccddc3b226f6baeab9658c06c118dfef.tar.gz
meson-d4cfc5d2ccddc3b226f6baeab9658c06c118dfef.tar.bz2
Only relink if exported symbols of dependencies change.
Diffstat (limited to 'symbolextractor.py')
-rwxr-xr-xsymbolextractor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/symbolextractor.py b/symbolextractor.py
index 19b6259..ef08cf3 100755
--- a/symbolextractor.py
+++ b/symbolextractor.py
@@ -43,14 +43,14 @@ def linux_syms(libfilename, outfilename):
if pe.returncode != 0:
raise RuntimeError('Readelf does not work')
result = [x for x in output.split('\n') if 'SONAME' in x]
- assert(len(result) == 1)
+ assert(len(result) <= 1)
pnm = subprocess.Popen(['nm', '--dynamic', '--extern-only', '--defined-only', '--format=posix', libfilename],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output = pnm.communicate()[0].decode()
if pnm.returncode != 0:
raise RuntimeError('nm does not work.')
result += [x.split()[0] for x in output.split('\n') if len(x) > 0]
- write_if_changed('\n'.join(result), outfilename)
+ write_if_changed('\n'.join(result) + '\n', outfilename)
def gen_symbols(libfilename, outfilename):
if platform.system() == 'Linux':