| OLD | NEW |
| (Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 { |
| 5 'variables': { |
| 6 'libvpx_build_vp9%': 1, |
| 7 'libvpx_source%': 'source/libvpx', |
| 8 'libvpx_config%': 'source/config', |
| 9 # Disable LTO for neon targets |
| 10 # crbug.com/408997 |
| 11 'use_lto%': 0, |
| 12 'conditions': [ |
| 13 ['os_posix==1', { |
| 14 'asm_obj_extension': 'o', |
| 15 }], |
| 16 ['OS=="win"', { |
| 17 'asm_obj_extension': 'obj', |
| 18 }], |
| 19 |
| 20 ['msan==1', { |
| 21 'target_arch_full': 'generic', |
| 22 }, { |
| 23 'conditions': [ |
| 24 ['(target_arch=="arm" or target_arch=="armv7") and arm_neon==1', { |
| 25 'target_arch_full': 'arm-neon', |
| 26 }, { |
| 27 'conditions': [ |
| 28 ['OS=="android" and ((target_arch=="arm" or target_arch=="armv7")
and arm_neon==0)', { |
| 29 'target_arch_full': 'arm-neon-cpu-detect', |
| 30 }, { |
| 31 'target_arch_full': '<(target_arch)', |
| 32 }], |
| 33 ], |
| 34 }], |
| 35 ['target_arch=="arm64"', { |
| 36 'target_arch_full': 'arm64', |
| 37 }], |
| 38 ], |
| 39 }], |
| 40 |
| 41 ['os_posix == 1 and OS != "mac"', { |
| 42 'OS_CATEGORY%': 'linux', |
| 43 }, { |
| 44 'OS_CATEGORY%': '<(OS)', |
| 45 }], |
| 46 ], |
| 47 |
| 48 # Location of the intermediate output. |
| 49 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx', |
| 50 }, |
| 51 'target_defaults': { |
| 52 'target_conditions': [ |
| 53 ['<(libvpx_build_vp9)==0', { |
| 54 'sources/': [ ['exclude', '(^|/)vp9/'], ], |
| 55 }], |
| 56 ], |
| 57 'variables': { |
| 58 'conditions': [ |
| 59 ['OS=="win" and buildtype=="Official"', { |
| 60 # Do not set to 'size', as it results in an error on win64. |
| 61 'optimize' :'speed', |
| 62 }], |
| 63 ], |
| 64 'clang_warning_flags': [ |
| 65 # libvpx heavily relies on implicit enum casting. |
| 66 '-Wno-conversion', |
| 67 # libvpx does `if ((a == b))` in some places. |
| 68 '-Wno-parentheses-equality', |
| 69 ], |
| 70 'clang_warning_flags_unset': [ |
| 71 # libvpx does assert(!"foo"); in some places. |
| 72 '-Wstring-conversion', |
| 73 ], |
| 74 }, |
| 75 }, |
| 76 'conditions': [ |
| 77 ['target_arch=="ia32"', { |
| 78 'includes': ['libvpx_srcs_x86_intrinsics.gypi', ], |
| 79 }], |
| 80 ['target_arch=="x64" and msan==0', { |
| 81 'includes': ['libvpx_srcs_x86_64_intrinsics.gypi', ], |
| 82 }], |
| 83 [ '(target_arch=="arm" or target_arch=="armv7") and arm_neon==0 and OS=="and
roid"', { |
| 84 # When building for targets which may not have NEON (but may!), include |
| 85 # support for neon and hide it behind Android cpu-features. |
| 86 'includes': ['libvpx_srcs_arm_neon_cpu_detect_intrinsics.gypi', ], |
| 87 }], |
| 88 [ '(target_arch != "arm" and target_arch != "armv7") and \ |
| 89 (target_arch != "mipsel" and target_arch != "mips64el")', { |
| 90 'targets': [ |
| 91 { |
| 92 # This libvpx target contains both encoder and decoder. |
| 93 # Encoder is configured to be realtime only. |
| 94 'target_name': 'libvpx', |
| 95 'type': 'static_library', |
| 96 'variables': { |
| 97 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx', |
| 98 'OS_CATEGORY%': '<(OS_CATEGORY)', |
| 99 'yasm_flags': [ |
| 100 '-D', 'CHROMIUM', |
| 101 '-I', '<(libvpx_config)/<(OS_CATEGORY)/<(target_arch_full)', |
| 102 '-I', '<(libvpx_config)', |
| 103 '-I', '<(libvpx_source)', |
| 104 ], |
| 105 # yasm only gets the flags we define. It doesn't inherit any of the |
| 106 # really useful defines that come with a gcc invocation. In this |
| 107 # case, we rely on __ANDROID__ to set 'rand' to 'lrand48'. |
| 108 # Previously we used the builtin _rand but that's gone away. |
| 109 'conditions': [ |
| 110 ['OS=="android"', { |
| 111 'yasm_flags': [ |
| 112 '-D', '__ANDROID__', |
| 113 ], |
| 114 }], |
| 115 ], |
| 116 }, |
| 117 'includes': [ |
| 118 '../yasm/yasm_compile.gypi' |
| 119 ], |
| 120 'include_dirs': [ |
| 121 '<(libvpx_config)/<(OS_CATEGORY)/<(target_arch_full)', |
| 122 '<(libvpx_config)', |
| 123 '<(libvpx_source)', |
| 124 '<(libvpx_source)/vp8/common', |
| 125 '<(libvpx_source)/vp8/decoder', |
| 126 '<(libvpx_source)/vp8/encoder', |
| 127 '<(shared_generated_dir)', # Provides vpx_rtcd.h. |
| 128 ], |
| 129 'direct_dependent_settings': { |
| 130 'include_dirs': [ |
| 131 '<(libvpx_source)', |
| 132 ], |
| 133 }, |
| 134 # VS2010 does not correctly incrementally link obj files generated |
| 135 # from asm files. This flag disables UseLibraryDependencyInputs to |
| 136 # avoid this problem. |
| 137 'msvs_2010_disable_uldi_when_referenced': 1, |
| 138 'conditions': [ |
| 139 ['target_arch=="ia32"', { |
| 140 'includes': [ |
| 141 'libvpx_srcs_x86.gypi', |
| 142 ], |
| 143 'dependencies': [ |
| 144 'libvpx_intrinsics_mmx', |
| 145 'libvpx_intrinsics_sse2', |
| 146 # Currently no sse3 intrinsic functions |
| 147 #'libvpx_intrinsics_sse3', |
| 148 'libvpx_intrinsics_ssse3', |
| 149 'libvpx_intrinsics_sse4_1', |
| 150 # Currently no avx intrinsic functions |
| 151 #'libvpx_intrinsics_avx', |
| 152 'libvpx_intrinsics_avx2', |
| 153 ], |
| 154 }], |
| 155 ['target_arch=="arm64"', { |
| 156 'includes': [ 'libvpx_srcs_arm64.gypi', ], |
| 157 }], |
| 158 ['target_arch=="x64"', { |
| 159 'conditions': [ |
| 160 ['msan==1', { |
| 161 'includes': [ 'libvpx_srcs_generic.gypi', ], |
| 162 }, { |
| 163 'includes': [ |
| 164 'libvpx_srcs_x86_64.gypi', |
| 165 ], |
| 166 'dependencies': [ |
| 167 'libvpx_intrinsics_mmx', |
| 168 'libvpx_intrinsics_sse2', |
| 169 # Currently no sse3 intrinsic functions |
| 170 #'libvpx_intrinsics_sse3', |
| 171 'libvpx_intrinsics_ssse3', |
| 172 'libvpx_intrinsics_sse4_1', |
| 173 # Currently no avx intrinsic functions |
| 174 #'libvpx_intrinsics_avx', |
| 175 'libvpx_intrinsics_avx2', |
| 176 ], |
| 177 }], |
| 178 ], |
| 179 }], |
| 180 ], |
| 181 }, |
| 182 ], |
| 183 }, |
| 184 ], |
| 185 # 'libvpx' target for mipsel and mips64el builds. |
| 186 [ 'target_arch=="mipsel" or target_arch=="mips64el"', { |
| 187 'targets': [ |
| 188 { |
| 189 # This libvpx target contains both encoder and decoder. |
| 190 # Encoder is configured to be realtime only. |
| 191 'target_name': 'libvpx', |
| 192 'type': 'static_library', |
| 193 'variables': { |
| 194 'shared_generated_dir': |
| 195 '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx', |
| 196 }, |
| 197 'includes': [ |
| 198 'libvpx_srcs_mips.gypi', |
| 199 ], |
| 200 'include_dirs': [ |
| 201 '<(libvpx_config)/<(OS_CATEGORY)/<(target_arch_full)', |
| 202 '<(libvpx_config)', |
| 203 '<(libvpx_source)', |
| 204 '<(libvpx_source)/vp8/common', |
| 205 '<(libvpx_source)/vp8/decoder', |
| 206 '<(libvpx_source)/vp8/encoder', |
| 207 ], |
| 208 'direct_dependent_settings': { |
| 209 'include_dirs': [ |
| 210 '<(libvpx_source)', |
| 211 ], |
| 212 }, |
| 213 'sources': [ |
| 214 '<(libvpx_config)/<(OS_CATEGORY)/<(target_arch_full)/vpx_config.c', |
| 215 ], |
| 216 }, |
| 217 ], |
| 218 }, |
| 219 ], |
| 220 # 'libvpx' target for ARM builds. |
| 221 [ '(target_arch=="arm" or target_arch=="armv7") ', { |
| 222 'targets': [ |
| 223 { |
| 224 # This libvpx target contains both encoder and decoder. |
| 225 # Encoder is configured to be realtime only. |
| 226 'target_name': 'libvpx', |
| 227 'type': 'static_library', |
| 228 |
| 229 'includes': [ 'ads2gas.gypi', ], |
| 230 |
| 231 'xcode_settings': { |
| 232 'OTHER_CFLAGS': [ |
| 233 '-I<!(pwd)/<(libvpx_config)/<(OS_CATEGORY)/<(target_arch_full)', |
| 234 '-I<!(pwd)/<(libvpx_config)', |
| 235 '-I<(shared_generated_dir)', |
| 236 ], |
| 237 }, |
| 238 'include_dirs': [ |
| 239 '<(libvpx_config)/<(OS_CATEGORY)/<(target_arch_full)', |
| 240 '<(libvpx_config)', |
| 241 '<(libvpx_source)', |
| 242 ], |
| 243 'direct_dependent_settings': { |
| 244 'include_dirs': [ |
| 245 '<(libvpx_source)', |
| 246 ], |
| 247 }, |
| 248 'conditions': [ |
| 249 # Libvpx optimizations for ARMv6 or ARMv7 without NEON. |
| 250 ['arm_neon==0', { |
| 251 'conditions': [ |
| 252 ['OS=="android"', { |
| 253 'includes': [ |
| 254 'libvpx_srcs_arm_neon_cpu_detect.gypi', |
| 255 ], |
| 256 'dependencies': [ |
| 257 'libvpx_intrinsics_neon', |
| 258 ], |
| 259 }, { |
| 260 'includes': [ |
| 261 'libvpx_srcs_arm.gypi', |
| 262 ], |
| 263 }], |
| 264 ], |
| 265 }], |
| 266 # Libvpx optimizations for ARMv7 with NEON. |
| 267 ['arm_neon==1', { |
| 268 'includes': [ |
| 269 'libvpx_srcs_arm_neon.gypi', |
| 270 ], |
| 271 }], |
| 272 ['OS == "android"', { |
| 273 'dependencies': [ |
| 274 '../../build/android/ndk.gyp:cpu_features', |
| 275 ], |
| 276 }], |
| 277 ['OS == "ios"', { |
| 278 'xcode_settings': { |
| 279 'OTHER_CFLAGS!': [ |
| 280 # Breaks at least boolhuff_armv5te:token_high_bit_not_set_ev. |
| 281 '-fstack-protector-all', # Implies -fstack-protector |
| 282 ], |
| 283 }, |
| 284 }], |
| 285 ], |
| 286 }, |
| 287 ], |
| 288 }], |
| 289 ], |
| 290 } |
| OLD | NEW |