diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-06-08 16:41:52 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-06-22 15:00:17 -0700 |
commit | 45793b6ee21021b69ddac5aa4560055b9b11f57b (patch) | |
tree | b4dbea2522043fb79bd66e7f687c5c7126717176 /mesonbuild | |
parent | d42cd735a4dc894d8e898a5f9e81029f6eb5364c (diff) | |
download | meson-45793b6ee21021b69ddac5aa4560055b9b11f57b.zip meson-45793b6ee21021b69ddac5aa4560055b9b11f57b.tar.gz meson-45793b6ee21021b69ddac5aa4560055b9b11f57b.tar.bz2 |
symbolextractor: Add support for Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'mesonbuild')
-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 ' |