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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } else { | 221 } else { |
222 arm_assembly_sources = libvpx_srcs_arm_assembly | 222 arm_assembly_sources = libvpx_srcs_arm_assembly |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 # Converts ARM assembly files to GAS style. | 226 # Converts ARM assembly files to GAS style. |
227 if (current_cpu == "arm" && arm_assembly_sources != []) { | 227 if (current_cpu == "arm" && arm_assembly_sources != []) { |
228 action_foreach("convert_arm_assembly") { | 228 action_foreach("convert_arm_assembly") { |
229 script = "//third_party/libvpx/run_perl.py" | 229 script = "//third_party/libvpx/run_perl.py" |
230 sources = arm_assembly_sources | 230 sources = arm_assembly_sources |
| 231 gen_file = |
| 232 get_label_info("//third_party/libvpx/source/libvpx", "root_gen_dir") + |
| 233 "/{{source_root_relative_dir}}/{{source_file_part}}.S" |
231 outputs = [ | 234 outputs = [ |
232 "$target_gen_dir/{{source_name_part}}.S", | 235 gen_file, |
233 ] | 236 ] |
234 if (is_ios) { | 237 if (is_ios) { |
235 ads2gas_script = | 238 ads2gas_script = |
236 "//third_party/libvpx/source/libvpx/build/make/ads2gas_apple.pl" | 239 "//third_party/libvpx/source/libvpx/build/make/ads2gas_apple.pl" |
237 } else { | 240 } else { |
238 ads2gas_script = | 241 ads2gas_script = |
239 "//third_party/libvpx/source/libvpx/build/make/ads2gas.pl" | 242 "//third_party/libvpx/source/libvpx/build/make/ads2gas.pl" |
240 } | 243 } |
241 args = [ | 244 args = [ |
242 "-s", | 245 "-s", |
243 rebase_path(ads2gas_script, root_build_dir), | 246 rebase_path(ads2gas_script, root_build_dir), |
244 "-i", | 247 "-i", |
245 "{{source}}", | 248 "{{source}}", |
246 "-o", | 249 "-o", |
247 rebase_path("$target_gen_dir/{{source_name_part}}.S"), | 250 rebase_path(gen_file), |
248 ] | 251 ] |
249 } | 252 } |
250 | 253 |
251 static_library("libvpx_assembly_arm") { | 254 static_library("libvpx_assembly_arm") { |
252 sources = get_target_outputs(":convert_arm_assembly") | 255 sources = get_target_outputs(":convert_arm_assembly") |
253 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 256 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
254 configs += [ ":libvpx_config" ] | 257 configs += [ ":libvpx_config" ] |
255 configs += [ ":libvpx_warnings" ] | 258 configs += [ ":libvpx_warnings" ] |
256 if (cpu_arch_full == "arm-neon" || cpu_arch_full == "arm-neon-cpu-detect") { | 259 if (cpu_arch_full == "arm-neon" || cpu_arch_full == "arm-neon-cpu-detect") { |
257 asmflags = [ "-mfpu=neon" ] | 260 asmflags = [ "-mfpu=neon" ] |
| 261 |
| 262 # allow asm files to include generated sources which match the source |
| 263 # tree layout, e.g., vpx_dsp/arm/... |
| 264 include_dirs = [ get_label_info("//third_party/libvpx/source/libvpx", |
| 265 "target_gen_dir") ] |
258 } | 266 } |
259 deps = [ | 267 deps = [ |
260 ":convert_arm_assembly", | 268 ":convert_arm_assembly", |
261 ] | 269 ] |
262 } | 270 } |
263 } | 271 } |
264 | 272 |
265 static_library("libvpx") { | 273 static_library("libvpx") { |
266 if (!is_debug && is_win) { | 274 if (!is_debug && is_win) { |
267 configs -= [ "//build/config/compiler:default_optimization" ] | 275 configs -= [ "//build/config/compiler:default_optimization" ] |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 321 } |
314 if (is_android) { | 322 if (is_android) { |
315 deps += [ "//third_party/android_tools:cpu_features" ] | 323 deps += [ "//third_party/android_tools:cpu_features" ] |
316 } | 324 } |
317 if (current_cpu == "arm" && arm_assembly_sources != []) { | 325 if (current_cpu == "arm" && arm_assembly_sources != []) { |
318 deps += [ ":libvpx_assembly_arm" ] | 326 deps += [ ":libvpx_assembly_arm" ] |
319 } | 327 } |
320 | 328 |
321 public_configs = [ ":libvpx_external_config" ] | 329 public_configs = [ ":libvpx_external_config" ] |
322 } | 330 } |
OLD | NEW |