| Index: ppapi/BUILD.gn
|
| diff --git a/ppapi/BUILD.gn b/ppapi/BUILD.gn
|
| index 1d42bd2e001fa752c0968108aa0abc04f2a54f7e..f45a2248b49c14a4a75716a1b94d845082213cd7 100644
|
| --- a/ppapi/BUILD.gn
|
| +++ b/ppapi/BUILD.gn
|
| @@ -29,6 +29,7 @@ copy("copy_test_files2") {
|
|
|
| import("//build/config/features.gni")
|
| import("//build/config/nacl/config.gni")
|
| +import("//build/config/nacl/rules.gni")
|
| import("//ppapi/ppapi_sources.gni")
|
| import("//testing/test.gni")
|
|
|
| @@ -312,7 +313,7 @@ if (enable_nacl) {
|
| }
|
| }
|
|
|
| - action("generate_nmf") {
|
| + generate_nmf("ppapi_nacl_tests_nmf") {
|
| if (is_nacl_glibc) {
|
| nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf"
|
| } else if (current_cpu == "pnacl") {
|
| @@ -320,85 +321,15 @@ if (enable_nacl) {
|
| } else {
|
| nmf = "${root_build_dir}/ppapi_nacl_tests_newlib.nmf"
|
| }
|
| - nexe = "${root_out_dir}/ppapi_nacl_tests.nexe"
|
| -
|
| - objdump = rebase_path("${nacl_toolprefix}objdump")
|
| -
|
| - script = "//native_client_sdk/src/tools/create_nmf.py"
|
| - sources = [
|
| - nexe,
|
| - ]
|
| - outputs = [
|
| - nmf,
|
| - ]
|
| - data = [
|
| - nexe,
|
| + executables = get_target_outputs(":nacl_tests_copy")
|
| + deps = [
|
| + ":nacl_tests_copy",
|
| ]
|
| - nmf_flags = []
|
| - if (is_nacl_glibc) {
|
| - nmf_flags += [ "--library-path=" + rebase_path(root_out_dir) ]
|
| - if (current_cpu == "x86") {
|
| - nmf_flags += [ "--library-path=" +
|
| - rebase_path("${nacl_toolchain_tooldir}/lib32") ]
|
| - data += [ "$root_build_dir/lib32/" ]
|
| - }
|
| - if (target_cpu == "x64" || (target_cpu == "x86" && is_win)) {
|
| - nmf_flags += [ "--library-path=" +
|
| - rebase_path("${nacl_toolchain_tooldir}/lib") ]
|
| - data += [ "$root_build_dir/lib64/" ]
|
| - }
|
| - if (current_cpu == "arm") {
|
| - nmf_flags += [ "--library-path=" +
|
| - rebase_path("${nacl_toolchain_tooldir}/lib") ]
|
| - data += [ "$root_build_dir/lib/" ]
|
| - }
|
| - }
|
| - args = [
|
| - "--no-default-libpath",
|
| - "--objdump=" + objdump,
|
| - "--output=" + rebase_path(nmf, root_build_dir),
|
| - "--stage-dependencies=" + rebase_path(root_build_dir),
|
| - ] + nmf_flags + rebase_path(sources, root_build_dir)
|
| - if (current_cpu == "pnacl") {
|
| - deps = [
|
| - ":translate_pexe_to_nexe",
|
| - ]
|
| - } else {
|
| - deps = [
|
| - ":ppapi_nacl_tests",
|
| - ]
|
| - if (is_nacl_glibc && current_cpu == "arm") {
|
| - deps += [ "//native_client/src/untrusted/elf_loader:elf_loader" ]
|
| - }
|
| - }
|
| }
|
|
|
| - action("generate_nonsfi_nmf") {
|
| + generate_nonsfi_test_nmf("ppapi_nacl_tests_pnacl_nonsfi_nmf") {
|
| nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl_nonsfi.nmf"
|
| - nexe = "${root_out_dir}/ppapi_nacl_tests.nexe"
|
| -
|
| - script = "//ppapi/tests/create_nonsfi_test_nmf.py"
|
| - sources = [
|
| - nexe,
|
| - ]
|
| - outputs = [
|
| - nmf,
|
| - ]
|
| - data = [
|
| - nexe,
|
| - ]
|
| - if (target_cpu == "x86") {
|
| - arch = "x86-32"
|
| - } else if (target_cpu == "x64") {
|
| - arch = "x86-64"
|
| - } else if (target_cpu == "arm") {
|
| - arch = "arm"
|
| - }
|
| - args = [
|
| - "--program=" + rebase_path(sources[0], root_build_dir),
|
| - "--arch=${arch}",
|
| - "--output=" + rebase_path(nmf, root_build_dir),
|
| - ]
|
| + executable = "${root_out_dir}/ppapi_nacl_tests.nexe"
|
| deps = [
|
| ":translate_pexe_to_nexe",
|
| ]
|
| @@ -409,12 +340,12 @@ if (enable_nacl) {
|
| data_deps = [
|
| ":copy_test_files",
|
| ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})",
|
| - ":generate_nmf(//build/toolchain/nacl:glibc_${target_cpu})",
|
| + ":ppapi_nacl_tests_nmf(//build/toolchain/nacl:glibc_${target_cpu})",
|
| ]
|
| if (enable_pnacl) {
|
| data_deps += [
|
| - ":generate_nmf(//build/toolchain/nacl:newlib_pnacl)",
|
| - ":generate_nonsfi_nmf(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
|
| + ":ppapi_nacl_tests_nmf(//build/toolchain/nacl:newlib_pnacl)",
|
| + ":ppapi_nacl_tests_pnacl_nonsfi_nmf(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
|
| ]
|
| }
|
| }
|
|
|