| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } else { | 211 } else { |
| 212 deps += [ ":ppapi_cpp_lib" ] | 212 deps += [ ":ppapi_cpp_lib" ] |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 | 215 |
| 216 if (current_cpu == "pnacl") { | 216 if (current_cpu == "pnacl") { |
| 217 action("translate_pexe_to_nexe") { | 217 action("translate_pexe_to_nexe") { |
| 218 pexe = "${root_out_dir}/ppapi_nacl_tests.pexe" | 218 pexe = "${root_out_dir}/ppapi_nacl_tests.pexe" |
| 219 nexe = "${root_out_dir}/ppapi_nacl_tests.nexe" | 219 nexe = "${root_out_dir}/ppapi_nacl_tests.nexe" |
| 220 | 220 |
| 221 script = "${nacl_toolchain_dir}/pnacl_newlib/bin/pydir/loader.py" | 221 script = "${nacl_toolchain_bindir}/pydir/loader.py" |
| 222 sources = [ | 222 sources = [ |
| 223 pexe, | 223 pexe, |
| 224 ] | 224 ] |
| 225 outputs = [ | 225 outputs = [ |
| 226 nexe, | 226 nexe, |
| 227 ] | 227 ] |
| 228 | 228 |
| 229 # TODO(phosek): remove the following once change 1360243003 is rolled | 229 # TODO(phosek): remove the following once change 1360243003 is rolled |
| 230 # into Chrome and use $target_cpu directly. | 230 # into Chrome and use $target_cpu directly. |
| 231 if (target_cpu == "x86") { | 231 if (target_cpu == "x86") { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 ] | 291 ] |
| 292 } else { | 292 } else { |
| 293 deps = [ | 293 deps = [ |
| 294 ":ppapi_nacl_tests", | 294 ":ppapi_nacl_tests", |
| 295 ] | 295 ] |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 | 298 |
| 299 action("generate_nmf") { | 299 action("generate_nmf") { |
| 300 if (is_nacl_glibc) { | 300 if (is_nacl_glibc) { |
| 301 if (current_cpu == "arm") { | |
| 302 toolchain_dir = "${nacl_toolchain_dir}/nacl_arm_glibc" | |
| 303 } else { | |
| 304 toolchain_dir = "${nacl_toolchain_dir}/nacl_x86_glibc" | |
| 305 } | |
| 306 nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf" | 301 nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf" |
| 307 } else if (current_cpu == "pnacl") { | 302 } else if (current_cpu == "pnacl") { |
| 308 toolchain_dir = "${nacl_toolchain_dir}/pnacl_newlib" | |
| 309 nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl.nmf" | 303 nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl.nmf" |
| 310 } else { | 304 } else { |
| 311 toolchain_dir = "${nacl_toolchain_dir}/nacl_x86_newlib" | |
| 312 nmf = "${root_build_dir}/ppapi_nacl_tests_newlib.nmf" | 305 nmf = "${root_build_dir}/ppapi_nacl_tests_newlib.nmf" |
| 313 } | 306 } |
| 314 nexe = "${root_out_dir}/ppapi_nacl_tests.nexe" | 307 nexe = "${root_out_dir}/ppapi_nacl_tests.nexe" |
| 315 | 308 |
| 316 if (current_cpu == "arm") { | 309 objdump = rebase_path("${nacl_toolprefix}objdump") |
| 317 objdump = rebase_path("${toolchain_dir}/bin/arm-nacl-objdump") | |
| 318 } else { | |
| 319 objdump = rebase_path("${toolchain_dir}/bin/x86_64-nacl-objdump") | |
| 320 } | |
| 321 | 310 |
| 322 script = "//native_client_sdk/src/tools/create_nmf.py" | 311 script = "//native_client_sdk/src/tools/create_nmf.py" |
| 323 sources = [ | 312 sources = [ |
| 324 nexe, | 313 nexe, |
| 325 ] | 314 ] |
| 326 outputs = [ | 315 outputs = [ |
| 327 nmf, | 316 nmf, |
| 328 ] | 317 ] |
| 329 data = [ | 318 data = [ |
| 330 nexe, | 319 nexe, |
| 331 ] | 320 ] |
| 332 nmf_flags = [] | 321 nmf_flags = [] |
| 333 if (is_nacl_glibc) { | 322 if (is_nacl_glibc) { |
| 334 nmf_flags += [ "--library-path=" + rebase_path(root_out_dir) ] | 323 nmf_flags += [ "--library-path=" + rebase_path(root_out_dir) ] |
| 335 if (current_cpu == "x86") { | 324 if (current_cpu == "x86") { |
| 336 nmf_flags += [ "--library-path=" + | 325 nmf_flags += [ "--library-path=" + |
| 337 rebase_path("${toolchain_dir}/x86_64-nacl/lib32") ] | 326 rebase_path("${nacl_toolchain_tooldir}/lib32") ] |
| 338 data += [ "$root_build_dir/lib32/" ] | 327 data += [ "$root_build_dir/lib32/" ] |
| 339 } | 328 } |
| 340 if (target_cpu == "x64" || (target_cpu == "x86" && is_win)) { | 329 if (target_cpu == "x64" || (target_cpu == "x86" && is_win)) { |
| 341 nmf_flags += [ "--library-path=" + | 330 nmf_flags += [ "--library-path=" + |
| 342 rebase_path("${toolchain_dir}/x86_64-nacl/lib") ] | 331 rebase_path("${nacl_toolchain_tooldir}/lib") ] |
| 343 data += [ "$root_build_dir/lib64/" ] | 332 data += [ "$root_build_dir/lib64/" ] |
| 344 } | 333 } |
| 345 if (current_cpu == "arm") { | 334 if (current_cpu == "arm") { |
| 346 nmf_flags += [ "--library-path=" + | 335 nmf_flags += [ "--library-path=" + |
| 347 rebase_path("${toolchain_dir}/arm-nacl/lib") ] | 336 rebase_path("${nacl_toolchain_tooldir}/lib") ] |
| 348 data += [ "$root_build_dir/lib/" ] | 337 data += [ "$root_build_dir/lib/" ] |
| 349 } | 338 } |
| 350 } | 339 } |
| 351 args = [ | 340 args = [ |
| 352 "--no-default-libpath", | 341 "--no-default-libpath", |
| 353 "--objdump=" + objdump, | 342 "--objdump=" + objdump, |
| 354 "--output=" + rebase_path(nmf, root_build_dir), | 343 "--output=" + rebase_path(nmf, root_build_dir), |
| 355 "--stage-dependencies=" + rebase_path(root_build_dir), | 344 "--stage-dependencies=" + rebase_path(root_build_dir), |
| 356 ] + nmf_flags + rebase_path(sources, root_build_dir) | 345 ] + nmf_flags + rebase_path(sources, root_build_dir) |
| 357 if (current_cpu == "pnacl") { | 346 if (current_cpu == "pnacl") { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 371 | 360 |
| 372 group("ppapi_nacl_tests_all") { | 361 group("ppapi_nacl_tests_all") { |
| 373 data_deps = [ | 362 data_deps = [ |
| 374 ":copy_test_files", | 363 ":copy_test_files", |
| 375 ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})", | 364 ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})", |
| 376 ":generate_nmf(//build/toolchain/nacl:glibc_${target_cpu})", | 365 ":generate_nmf(//build/toolchain/nacl:glibc_${target_cpu})", |
| 377 ":generate_nmf(//build/toolchain/nacl:newlib_pnacl)", | 366 ":generate_nmf(//build/toolchain/nacl:newlib_pnacl)", |
| 378 ] | 367 ] |
| 379 } | 368 } |
| 380 } | 369 } |
| OLD | NEW |