diff options
| author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-15 14:11:02 -0800 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2022-11-16 09:49:48 +0530 |
| commit | 8ee4660788df678b64bb2986b5f2f8474c127ae2 (patch) | |
| tree | e25a71342060f060c1536bb0137d3fb3945c3171 | |
| parent | a2cac72d9bcbe8d31dc591992964599c5664ba66 (diff) | |
| download | meson-8ee4660788df678b64bb2986b5f2f8474c127ae2.tar.gz | |
linkers: Don't build thin archives on illumos or Solaris
The system linkers don't support this particular GNU extension on
these OS'es, so don't build them there.
Based on an OpenIndiana patch created by @alarcher. Closes #9882.
| -rw-r--r-- | mesonbuild/linkers/linkers.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index 27ccef37b..ee7d0092a 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -208,8 +208,12 @@ class ArLinker(ArLikeLinker): return self.can_rsp def get_std_link_args(self, env: 'Environment', is_thin: bool) -> T.List[str]: - # FIXME: osx ld rejects this: "file built for unknown-unsupported file format" - if is_thin and not env.machines[self.for_machine].is_darwin(): + # Thin archives are a GNU extension not supported by the system linkers + # on Mac OS X, Solaris, or illumos, so don't build them on those OSes. + # OS X ld rejects with: "file built for unknown-unsupported file format" + # illumos/Solaris ld rejects with: "unknown file type" + if is_thin and not env.machines[self.for_machine].is_darwin() \ + and not env.machines[self.for_machine].is_sunos(): return self.std_thin_args else: return self.std_args |
