diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-06-24 22:48:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-24 22:48:13 +0300 |
commit | 35f2a2444f9298b59f0f2cd60b71d31c96ffb511 (patch) | |
tree | 4b244789e84f2e27451959bc2faf089b16ee64a2 /mesonbuild/scripts | |
parent | 08f29c18123f1c77866638b9c595a6c2fff163b3 (diff) | |
parent | 28d1bb90162931a5fcce7470b22c622b903e6dca (diff) | |
download | meson-35f2a2444f9298b59f0f2cd60b71d31c96ffb511.zip meson-35f2a2444f9298b59f0f2cd60b71d31c96ffb511.tar.gz meson-35f2a2444f9298b59f0f2cd60b71d31c96ffb511.tar.bz2 |
Merge pull request #7370 from alanc/solaris-fixes
Solaris fixes
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r-- | mesonbuild/scripts/symbolextractor.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py index 41cca26..5240275 100644 --- a/mesonbuild/scripts/symbolextractor.py +++ b/mesonbuild/scripts/symbolextractor.py @@ -121,6 +121,13 @@ def gnu_syms(libfilename: str, outfilename: str): result += [' '.join(entry)] write_if_changed('\n'.join(result) + '\n', outfilename) +def solaris_syms(libfilename: str, outfilename: str): + # gnu_syms() works with GNU nm & readelf, not Solaris nm & elfdump + origpath = os.environ['PATH'] + os.environ['PATH'] = '/usr/gnu/bin:' + origpath + gnu_syms(libfilename, outfilename) + os.environ['PATH'] = origpath + def osx_syms(libfilename: str, outfilename: str): # Get the name of the library output = call_tool('otool', ['-l', libfilename]) @@ -270,6 +277,8 @@ def gen_symbols(libfilename: str, impfilename: str, outfilename: str, cross_host # No import library. Not sure how the DLL is being used, so just # rebuild everything that links to it every time. dummy_syms(outfilename) + elif mesonlib.is_sunos(): + solaris_syms(libfilename, outfilename) else: if not os.path.exists(TOOL_WARNING_FILE): mlog.warning('Symbol extracting has not been implemented for this ' |