Tools: ardupilotwaf: use classic clang linker when compiling on macOS

- Fix issue where linker fails with Xcode 15.3.
- Add check for CC_VERSION.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
Rhys Mainwaring 2024-04-05 17:53:32 +01:00 committed by Andrew Tridgell
parent fd9423b254
commit 513a6b6206

View File

@ -433,6 +433,11 @@ class Board:
] ]
if cfg.env.DEST_OS == 'darwin': if cfg.env.DEST_OS == 'darwin':
if self.cc_version_gte(cfg, 15, 0):
env.LINKFLAGS += [
'-Wl,-dead_strip,-ld_classic',
]
else:
env.LINKFLAGS += [ env.LINKFLAGS += [
'-Wl,-dead_strip', '-Wl,-dead_strip',
] ]