waf: add support for sitl build on mac

This commit is contained in:
Siddharth Bharat Purohit 2016-06-21 19:56:18 +05:30 committed by Lucas De Marchi
parent 1923d9029e
commit 71c2f69a63
2 changed files with 12 additions and 3 deletions

View File

@ -148,10 +148,16 @@ class Board:
'-O0',
]
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))

View File

@ -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='''