Skip to content

Commit

Permalink
Tools: ardupilotwaf: use classic clang linker when compiling on macOS
Browse files Browse the repository at this point in the history
- Fix issue where linker fails with Xcode 15.3.
- Add check for CC_VERSION.

Signed-off-by: Rhys Mainwaring <[email protected]>
  • Loading branch information
srmainwaring committed Apr 5, 2024
1 parent 364e6f0 commit 6d4950a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,14 @@ def configure_env(self, cfg, env):
]

if cfg.env.DEST_OS == 'darwin':
env.LINKFLAGS += [
'-Wl,-dead_strip',
]
if self.cc_version_gte(cfg, 15, 0):
env.LINKFLAGS += [
'-Wl,-dead_strip,-ld_classic',
]
else:
env.LINKFLAGS += [
'-Wl,-dead_strip',
]
else:
env.LINKFLAGS += [
'-fno-exceptions',
Expand Down

0 comments on commit 6d4950a

Please sign in to comment.