| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/arm.gni") | 5 import("//build/config/arm.gni") |
| 6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
| 7 import("//build/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
| 8 import("//third_party/libvpx/libvpx_srcs.gni") | 8 import("//third_party/libvpx/libvpx_srcs.gni") |
| 9 import("//third_party/yasm/yasm_assemble.gni") | 9 import("//third_party/yasm/yasm_assemble.gni") |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 "-Wno-sign-compare", | 83 "-Wno-sign-compare", |
| 84 ] | 84 ] |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 # This config is applied to targets that depend on libvpx. | 88 # This config is applied to targets that depend on libvpx. |
| 89 config("libvpx_external_config") { | 89 config("libvpx_external_config") { |
| 90 include_dirs = [ "//third_party/libvpx/source/libvpx" ] | 90 include_dirs = [ "//third_party/libvpx/source/libvpx" ] |
| 91 } | 91 } |
| 92 | 92 |
| 93 if (current_cpu == "x86" || current_cpu == "x64") { | 93 if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { |
| 94 yasm_assemble("libvpx_yasm") { | 94 yasm_assemble("libvpx_yasm") { |
| 95 if (current_cpu == "x86") { | 95 if (current_cpu == "x86") { |
| 96 sources = libvpx_srcs_x86_assembly | 96 sources = libvpx_srcs_x86_assembly |
| 97 } else if (current_cpu == "x64") { | 97 } else if (current_cpu == "x64") { |
| 98 sources = libvpx_srcs_x86_64_assembly | 98 sources = libvpx_srcs_x86_64_assembly |
| 99 } | 99 } |
| 100 | 100 |
| 101 defines = [ "CHROMIUM" ] | 101 defines = [ "CHROMIUM" ] |
| 102 if (is_android) { | 102 if (is_android) { |
| 103 # On Android, define __ANDROID__ to use alternative standard library | 103 # On Android, define __ANDROID__ to use alternative standard library |
| 104 # functions. | 104 # functions. |
| 105 defines += [ "__ANDROID__" ] | 105 defines += [ "__ANDROID__" ] |
| 106 } | 106 } |
| 107 include_dirs = [ | 107 include_dirs = [ |
| 108 platform_include_dir, | 108 platform_include_dir, |
| 109 "//third_party/libvpx/source/config", | 109 "//third_party/libvpx/source/config", |
| 110 "//third_party/libvpx/source/libvpx", | 110 "//third_party/libvpx/source/libvpx", |
| 111 target_gen_dir, | 111 target_gen_dir, |
| 112 ] | 112 ] |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 if (current_cpu == "x86" || current_cpu == "x64") { | 116 if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { |
| 117 # The following targets are deliberately source_set rather than | 117 # The following targets are deliberately source_set rather than |
| 118 # static_library. The :libvpx target exposes these intrinsic implementations | 118 # static_library. The :libvpx target exposes these intrinsic implementations |
| 119 # via global function pointer symbols, which hides the object dependency at | 119 # via global function pointer symbols, which hides the object dependency at |
| 120 # link time. On Mac, this results in undefined references to the intrinsic | 120 # link time. On Mac, this results in undefined references to the intrinsic |
| 121 # symbols. | 121 # symbols. |
| 122 | 122 |
| 123 source_set("libvpx_intrinsics_mmx") { | 123 source_set("libvpx_intrinsics_mmx") { |
| 124 configs += [ ":libvpx_config" ] | 124 configs += [ ":libvpx_config" ] |
| 125 configs -= [ "//build/config/compiler:chromium_code" ] | 125 configs -= [ "//build/config/compiler:chromium_code" ] |
| 126 configs += [ "//build/config/compiler:no_chromium_code" ] | 126 configs += [ "//build/config/compiler:no_chromium_code" ] |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 } | 315 } |
| 316 if (is_android) { | 316 if (is_android) { |
| 317 deps += [ "//third_party/android_tools:cpu_features" ] | 317 deps += [ "//third_party/android_tools:cpu_features" ] |
| 318 } | 318 } |
| 319 if (current_cpu == "arm") { | 319 if (current_cpu == "arm") { |
| 320 deps += [ ":libvpx_assembly_arm" ] | 320 deps += [ ":libvpx_assembly_arm" ] |
| 321 } | 321 } |
| 322 | 322 |
| 323 public_configs = [ ":libvpx_external_config" ] | 323 public_configs = [ ":libvpx_external_config" ] |
| 324 } | 324 } |
| OLD | NEW |