Bug 880419: rollup of existing modifications to libyuv rs=jesup

This commit is contained in:
Randell Jesup 2014-01-16 17:08:01 -05:00
Родитель 17db7136e8
Коммит f49f2ee43d
4 изменённых файлов: 46 добавлений и 5 удалений

Просмотреть файл

@ -95,6 +95,8 @@ if CONFIG['ARM_ARCH']:
# CPU detection for ARM works on Android only. armv7 always uses CPU
# detection, so we have to set armv7=0 for non-Android target
gyp_vars['armv7'] = 0
# For libyuv
gyp_vars['arm_version'] = CONFIG['ARM_ARCH']
# Don't try to compile ssse3/sse4.1 code if toolchain doesn't support
if CONFIG['INTEL_ARCHITECTURE']:

Просмотреть файл

@ -196,11 +196,15 @@
# Python version.
'python_ver%': '2.6',
# Set ARM version (for libyuv)
'arm_version%': 6,
# Set ARM-v7 compilation flags
'armv7%': 0,
# Set Neon compilation flags (only meaningful if armv7==1).
'arm_neon%': 1,
'arm_neon_optional%': 0,
# The system root for cross-compiles. Default: none.
'sysroot%': '',
@ -622,8 +626,10 @@
'fastbuild%': '<(fastbuild)',
'dcheck_always_on%': '<(dcheck_always_on)',
'python_ver%': '<(python_ver)',
'arm_version%': '<(arm_version)',
'armv7%': '<(armv7)',
'arm_neon%': '<(arm_neon)',
'arm_neon_optional%': '<(arm_neon_optional)',
'sysroot%': '<(sysroot)',
'system_libdir%': '<(system_libdir)',
'component%': '<(component)',

Просмотреть файл

@ -13,12 +13,26 @@
#include <stddef.h> // for NULL, size_t
#if defined(__ANDROID__) || (defined(_MSC_VER) && (_MSC_VER < 1600))
#include <sys/types.h> // for uintptr_t on x86
#else
#if !(defined(_MSC_VER) && (_MSC_VER < 1600))
#include <stdint.h> // for uintptr_t
#endif
typedef uint64_t uint64;
typedef int64_t int64;
#if defined(_MSC_VER)
// nsprpub/pr/include/obsolete/protypes.h defines these weirdly
typedef long int32;
typedef unsigned long uint32;
#else
typedef uint32_t uint32;
typedef int32_t int32;
#endif
typedef uint16_t uint16;
typedef int16_t int16;
typedef uint8_t uint8;
typedef int8_t int8;
#define INT_TYPES_DEFINED 1
#ifndef GG_LONGLONG
#ifndef INT_TYPES_DEFINED
#define INT_TYPES_DEFINED

Просмотреть файл

@ -12,6 +12,7 @@
],
'variables': {
'use_system_libjpeg%': 0,
'yuv_disable_asm%': 0,
'build_neon': 0,
'conditions': [
['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {
@ -67,10 +68,10 @@
# Change type to 'shared_library' to build .so or .dll files.
'type': 'static_library',
# Allows libyuv.a redistributable library without external dependencies.
'standalone_static_library': 1,
# 'standalone_static_library': 1,
'conditions': [
# TODO(fbarchard): Use gyp define to enable jpeg.
[ 'OS != "ios"', {
[ 'OS != "ios" and build_with_mozilla!=1', {
'defines': [
'HAVE_JPEG'
],
@ -102,6 +103,24 @@
'LIBYUV_NEON',
]
}],
[ 'yuv_disable_asm!=0', {
'defines': [
# Enable the following 3 macros to turn off assembly for specified CPU.
'LIBYUV_DISABLE_X86',
'LIBYUV_DISABLE_NEON',
'LIBYUV_DISABLE_MIPS',
],
}],
['build_with_mozilla==1', {
'include_dirs': [
'$(DEPTH)/dist/include',
],
'direct_dependent_settings': {
'include_dirs': [
'$(DEPTH)/dist/include',
],
},
}],
],
'defines': [
# Enable the following 3 macros to turn off assembly for specified CPU.