Browse Source

waf: add support for sitl build on mac

master
Siddharth Bharat Purohit 9 years ago committed by Lucas De Marchi
parent
commit
71c2f69a63
  1. 12
      Tools/ardupilotwaf/boards.py
  2. 3
      Tools/ardupilotwaf/cxx_checks.py

12
Tools/ardupilotwaf/boards.py

@ -148,9 +148,15 @@ class Board: @@ -148,9 +148,15 @@ class Board:
'-O0',
]
env.LINKFLAGS += [
'-Wl,--gc-sections',
]
if cfg.env.DEST_OS == 'darwin':
env.LINKFLAGS += [
'-Wl,-dead_strip',
]
else:
env.LINKFLAGS += [
'-Wl,--gc-sections',
]
def build(self, bld):
bld.ap_version_append_str('GIT_VERSION', bld.git_head_hash(short=True))

3
Tools/ardupilotwaf/cxx_checks.py

@ -126,6 +126,9 @@ def ap_common_checks(cfg): @@ -126,6 +126,9 @@ def ap_common_checks(cfg):
@conf
def check_librt(cfg, env):
if cfg.env.DEST_OS == 'darwin':
return True
ret = cfg.check(
compiler='cxx',
fragment='''

Loading…
Cancel
Save