Bug 1522035 - Set HAVE_ALIGNED_MALLOC as global macro and avoid redefining in libdav1d. r=firefox-build-system-reviewers,mshal

Differential Revision: https://phabricator.services.mozilla.com/D17632

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alex Chronopoulos 2019-01-30 09:06:52 +00:00
parent f1fd8e7fb9
commit 0c15094a05
2 changed files with 10 additions and 13 deletions

View File

@ -47,5 +47,11 @@ AC_EGREP_HEADER(valloc, unistd.h,
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))
AC_MSG_CHECKING([for _aligned_malloc in malloc.h])
AC_EGREP_HEADER(_aligned_malloc, malloc.h,
AC_DEFINE(HAVE_ALIGNED_MALLOC)
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))
])

View File

@ -43,19 +43,10 @@
# define HAVE_ASM 0
#endif
// Set memory aligment
#if defined(__ANDROID__) && (ARCH_ARM == 1 || ARCH_X86_32 == 1)
# define HAVE_MEMALIGN 1
#elif ARCH_X86_64 == 1 && (defined(_WIN32) || defined(__CYGWIN__)) && \
defined(MOZ_ASAN)
# define HAVE_ALIGNED_MALLOC 1
#else
# define HAVE_POSIX_MEMALIGN 1
#endif
// unistd.h is used by tools, which we do not
// build, so we do not really care.
#define HAVE_UNISTD_H 1
// The following macros are defined from autoconf
// according to the system configuration.
// (HAVE_MEMALIGN | HAVE_ALIGNED_MALLOC | HAVE_POSIX_MEMALIGN)
// HAVE_UNISTD_H
// Important when asm is enabled
#if defined(__APPLE__)