Bug 1672867 - Silence warning about aligned_alloc only being available on macOS 10.15 or newer. r=firefox-build-system-reviewers,mhentges

This warning turns into an error on automation, and is only due to the
fact that newer SDKs have a declaration for it with a version guard, but
we're actually using our own definition of the function, so whether it's
available in older versions of macOS is irrelevant.

Differential Revision: https://phabricator.services.mozilla.com/D94512
This commit is contained in:
Mike Hommey 2020-10-22 23:16:23 +00:00
parent 45803f0f80
commit 6d9ed07aa6

View File

@ -15,6 +15,12 @@ SOURCES += [
'Replay.cpp',
]
if CONFIG['OS_TARGET'] == 'Darwin':
# Work around "warning: 'aligned_alloc' is only available on macOS 10.15 or newer"
# when building with MACOSX_DEPLOYMENT_TARGET < 10.15 with >= 10.15 SDK.
# We have our own definition of the function, so it doesn't matter what the SDK says.
SOURCES['Replay.cpp'].flags += ['-Wno-unguarded-availability-new']
if CONFIG['MOZ_REPLACE_MALLOC_STATIC'] and \
(CONFIG['MOZ_DMD'] or CONFIG['MOZ_PHC']):
UNIFIED_SOURCES += [