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