Bug 1536538 - Improve a check in config file and correct typos. r=TD-Linux
authorAlex Chronopoulos <achronop@gmail.com>
Wed, 20 Mar 2019 14:24:23 +0000
changeset 465217 29cd1266e85e48a17bd027b13d87817fc9c1c849
parent 465216 48cd73fc089340f641dab57d6563e66b6738d731
child 465218 aa92f46d4de3078724ecd334da23e0dd9312a8bd
push id35735
push usershindli@mozilla.com
push dateThu, 21 Mar 2019 04:34:45 +0000
treeherdermozilla-central@ac0cd1a710f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersTD-Linux
bugs1536538
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1536538 - Improve a check in config file and correct typos. r=TD-Linux Differential Revision: https://phabricator.services.mozilla.com/D24071
media/libdav1d/asm/moz.build
media/libdav1d/config.h
media/libdav1d/moz.build
--- a/media/libdav1d/asm/moz.build
+++ b/media/libdav1d/asm/moz.build
@@ -20,18 +20,16 @@ LOCAL_INCLUDES += [
 # see: third_party/dav1d/include/dav1d/common.h
 DEFINES['DAV1D_API'] = ''
 
 CFLAGS += [
     # find the config.h file.
     '-I%s/dist/include/dav1d/' % TOPOBJDIR,
 ]
 
-# This code is only built on Windows and Linux for now.
-
 # Attaching config.asm file
 if CONFIG['CPU_ARCH'] == 'x86':
     if CONFIG['OS_TARGET'] == 'WINNT':
         ASFLAGS += ['-I%s/media/libdav1d/asm/x86_32/win/' % TOPSRCDIR]
     else:
         ASFLAGS += ['-I%s/media/libdav1d/asm/x86_32/' % TOPSRCDIR]
 
 if CONFIG['CPU_ARCH'] == 'x86_64':
@@ -40,17 +38,17 @@ if CONFIG['CPU_ARCH'] == 'x86_64':
     elif CONFIG['OS_TARGET'] == 'Darwin':
         ASFLAGS += ['-I%s/media/libdav1d/asm/x86_64/osx/' % TOPSRCDIR]
     elif CONFIG['OS_TARGET'] == 'WINNT':
         ASFLAGS += ['-I%s/media/libdav1d/asm/x86_64/' % TOPSRCDIR]
     else:
         error('Platform %s is not expected' % CONFIG['OS_TARGET'])
 
     if CONFIG['OS_TARGET'] in ('Darwin', 'WINNT'):
-        # Change the default stack aligment (16) to 32
+        # Change the default stack alignment (16) to 32
         if CONFIG['CC_TYPE'] == 'clang':
             CFLAGS += ['-mstack-alignment=32']
         elif CONFIG['CC_TYPE'] == 'gcc':
             CFLAGS += ['-mpreferred-stack-boundary=5']
 
 if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'):
     SOURCES += [
         '../../../third_party/dav1d/src/x86/cpu.c',
--- a/media/libdav1d/config.h
+++ b/media/libdav1d/config.h
@@ -47,18 +47,18 @@
 // (HAVE_MEMALIGN | HAVE_ALIGNED_MALLOC | HAVE_POSIX_MEMALIGN)
 // HAVE_UNISTD_H
 
 // Important when asm is enabled
 #if defined(__APPLE__) || (ARCH_x86_32 == 1 && defined(_WIN32))
 #  define PREFIX 1
 #endif
 
-#if (ARCH_x86_32 == 1 || ARCH_X86_64 == 1) && defined(__linux__) && \
-    !defined(__ANDROID__)
+#if ARCH_x86_32 == 1 || \
+    (ARCH_X86_64 == 1 && defined(__linux__) && !defined(__ANDROID__))
 #  define STACK_ALIGNMENT 16
 #else
 #  define STACK_ALIGNMENT 32
 #endif
 
 #if defined(_WIN32) || defined(__CYGWIN__)
 // _WIN32_WINNT 0x0601 is set in global macros
 #  define UNICODE 1
--- a/media/libdav1d/moz.build
+++ b/media/libdav1d/moz.build
@@ -25,20 +25,20 @@ entrypoint_source_files = [
 ]
 SOURCES += [f for f in entrypoint_source_files]
 
 # Don't export DAV1D_API symbols from libxul
 # see: third_party/dav1d/include/dav1d/common.h
 DEFINES['DAV1D_API'] = ''
 
 if CONFIG['MOZ_DAV1D_ASM']:
-    # Default stack aligment is 16 bytes
+    # Default stack alignment is 16 bytes
     DIRS += ['asm']
     if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin') and CONFIG['CPU_ARCH'] == 'x86_64':
-         # Update stack aligment to 32 bytes
+         # Update stack alignment to 32 bytes
          if CONFIG['CC_TYPE'] == 'clang':
              CFLAGS += ['-mstack-alignment=32']
              for ep in entrypoint_source_files:
                  SOURCES[ep].flags += ['-mstackrealign']
          elif CONFIG['CC_TYPE'] == 'gcc':
              CFLAGS += ['-mpreferred-stack-boundary=5']
              for ep in entrypoint_source_files:
                  SOURCES[ep].flags += ['-mincoming-stack-boundary=4']