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 copy("copy_test_files") { | 5 copy("copy_test_files") { |
6 visibility = [ ":*" ] | 6 visibility = [ ":*" ] |
7 sources = [ | 7 sources = [ |
8 # Keep "test_case.html.mock-http-headers" with "test_case.html". | 8 # Keep "test_case.html.mock-http-headers" with "test_case.html". |
9 "tests/ppapi_nacl_tests_newlib.nmf", | 9 "tests/ppapi_nacl_tests_newlib.nmf", |
10 "tests/test_case.html", | 10 "tests/test_case.html", |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 } | 258 } |
259 | 259 |
260 copy("nacl_tests_copy") { | 260 copy("nacl_tests_copy") { |
261 sources = [ | 261 sources = [ |
262 "${root_out_dir}/ppapi_nacl_tests.nexe", | 262 "${root_out_dir}/ppapi_nacl_tests.nexe", |
263 ] | 263 ] |
264 | 264 |
265 # The CPU names used in tests/ppapi_nacl_tests_newlib.nmf | 265 # The CPU names used in tests/ppapi_nacl_tests_newlib.nmf |
266 # are the ones used in GYP (x32 for x86). | 266 # are the ones used in GYP (x32 for x86). |
267 if (target_cpu == "x86") { | 267 if (current_cpu == "pnacl") { |
268 nmf_cpu = "x32" | |
269 } else if (current_cpu != "pnacl") { | |
270 nmf_cpu = target_cpu | |
271 } | |
272 if (is_nacl_glibc) { | |
273 suffix = "glibc_${nmf_cpu}" | |
274 } else if (current_cpu == "pnacl") { | |
275 suffix = "pnacl" | 268 suffix = "pnacl" |
276 } else { | 269 } else { |
277 suffix = "newlib_${nmf_cpu}" | 270 if (target_cpu == "x86") { |
| 271 nmf_cpu = "x32" |
| 272 } else if (current_cpu != "pnacl") { |
| 273 nmf_cpu = target_cpu |
| 274 } |
| 275 if (is_nacl_glibc) { |
| 276 suffix = "glibc_${nmf_cpu}" |
| 277 } else { |
| 278 suffix = "newlib_${nmf_cpu}" |
| 279 } |
278 } | 280 } |
279 outputs = [ | 281 outputs = [ |
280 "${root_build_dir}/{{source_name_part}}_${suffix}.nexe", | 282 "${root_build_dir}/{{source_name_part}}_${suffix}.nexe", |
281 ] | 283 ] |
282 if (current_cpu == "pnacl") { | 284 if (current_cpu == "pnacl") { |
283 deps = [ | 285 deps = [ |
284 ":translate_pexe_to_nexe", | 286 ":translate_pexe_to_nexe", |
285 ] | 287 ] |
286 } else { | 288 } else { |
287 deps = [ | 289 deps = [ |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 if (target_cpu == "x86" || target_cpu == "x64") { | 353 if (target_cpu == "x86" || target_cpu == "x64") { |
352 data_deps += [ | 354 data_deps += [ |
353 ":copy_test_files", | 355 ":copy_test_files", |
354 ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})", | 356 ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})", |
355 ":generate_nmf(//build/toolchain/nacl:glibc_${target_cpu})", | 357 ":generate_nmf(//build/toolchain/nacl:glibc_${target_cpu})", |
356 ":generate_nmf(//build/toolchain/nacl:newlib_pnacl)", | 358 ":generate_nmf(//build/toolchain/nacl:newlib_pnacl)", |
357 ] | 359 ] |
358 } | 360 } |
359 } | 361 } |
360 } | 362 } |
OLD | NEW |