Chromium Code Reviews| Index: ppapi/BUILD.gn |
| diff --git a/ppapi/BUILD.gn b/ppapi/BUILD.gn |
| index 0a3f6c47722997d577fe93312039826b5f15ecf1..f002f71427156e9baaf920e995811fa18bb2a341 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,45 +321,8 @@ 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, |
| - ] |
| - 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) |
| + executable = "${root_out_dir}/ppapi_nacl_tests.nexe" |
| + nmfflags = [ "--stage-dependencies=" + rebase_path(root_build_dir) ] |
|
Roland McGrath
2015/11/11 21:44:32
Why isn't this the default behavior of the templat
|
| if (current_cpu == "pnacl") { |
| deps = [ |
| ":translate_pexe_to_nexe", |
| @@ -367,38 +331,12 @@ if (enable_nacl) { |
| 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,9 +347,9 @@ 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})", |
| - ":generate_nmf(//build/toolchain/nacl:newlib_pnacl)", |
| - ":generate_nonsfi_nmf(//build/toolchain/nacl:newlib_pnacl_nonsfi)", |
| + ":ppapi_nacl_tests_nmf(//build/toolchain/nacl:glibc_${target_cpu})", |
| + ":ppapi_nacl_tests_nmf(//build/toolchain/nacl:newlib_pnacl)", |
| + ":ppapi_nacl_tests_pnacl_nonsfi_nmf(//build/toolchain/nacl:newlib_pnacl_nonsfi)", |
| ] |
| } |
| } |