GN: Properly mark all NaCl test depencies as data_deps
NaCl tests and helpers are build as standalone executables and hence need to be marked as data_deps to be copied over to shards. BUG=462791 Review URL: https://codereview.chromium.org/1547463004 Cr-Commit-Position: refs/heads/master@{#367367}
This commit is contained in:
@ -987,7 +987,7 @@ if (!is_android) {
|
||||
}
|
||||
if (is_win || is_linux) {
|
||||
sources += [ "../browser/nacl_host/test/nacl_gdb_browsertest.cc" ]
|
||||
deps += [ "//chrome/browser/nacl_host/test:mock_nacl_gdb" ]
|
||||
data_deps += [ "//chrome/browser/nacl_host/test:mock_nacl_gdb" ]
|
||||
}
|
||||
if (is_win) {
|
||||
# TODO(halyavin) NaCl on Windows can't open debug stub socket in
|
||||
|
@ -9,7 +9,7 @@ group("nacl") {
|
||||
newlib = "//build/toolchain/nacl:clang_newlib_${target_cpu}"
|
||||
glibc = "//build/toolchain/nacl:glibc_${target_cpu}"
|
||||
pnacl = "//build/toolchain/nacl:newlib_pnacl"
|
||||
deps = [
|
||||
data_deps = [
|
||||
":exit_status_test($glibc)",
|
||||
":exit_status_test($newlib)",
|
||||
":exit_status_test($pnacl)",
|
||||
@ -74,13 +74,13 @@ group("nacl") {
|
||||
]
|
||||
if (is_linux) {
|
||||
nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
|
||||
deps += [
|
||||
data_deps += [
|
||||
":irt_exception_test($nonsfi)",
|
||||
":irt_manifest_file($nonsfi)",
|
||||
":shared_test_files($nonsfi)",
|
||||
]
|
||||
if (is_clang) {
|
||||
deps += [ ":nonsfi_libc_free" ]
|
||||
data_deps += [ ":nonsfi_libc_free" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ if (is_linux) {
|
||||
}
|
||||
|
||||
group("helper_nonsfi") {
|
||||
deps = [
|
||||
data_deps = [
|
||||
":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
|
||||
]
|
||||
}
|
||||
@ -159,6 +159,7 @@ if (is_linux) {
|
||||
testonly = true
|
||||
data_deps = [
|
||||
":helper_nonsfi_unittests",
|
||||
":nacl_helper_nonsfi_unittests_main_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,10 @@ source_set("app_shell_lib") {
|
||||
]
|
||||
|
||||
if (is_linux) {
|
||||
deps += [ "//components/nacl/loader:nacl_helper" ]
|
||||
deps += [
|
||||
"//components/nacl/loader:helper_nonsfi",
|
||||
"//components/nacl/loader:nacl_helper",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,6 +193,8 @@ source_set("ppapi_gles2_lib") {
|
||||
if (enable_nacl) {
|
||||
if (is_nacl) {
|
||||
shared_library("ppapi_cpp_lib_shared") {
|
||||
output_name = "libppapi_cpp"
|
||||
|
||||
# When using gcc, we hide all symbols by default, but that breaks at
|
||||
# link time as the test executable requires symbols defined in the
|
||||
# shared library.
|
||||
@ -211,7 +213,8 @@ if (enable_nacl) {
|
||||
]
|
||||
}
|
||||
|
||||
executable("ppapi_nacl_tests") {
|
||||
executable("ppapi_nacl_tests_nexe") {
|
||||
output_name = "ppapi_nacl_tests"
|
||||
include_dirs = [ "lib/gl/include" ]
|
||||
sources = ppapi_sources.test_common_source_files +
|
||||
ppapi_sources.test_nacl_source_files
|
||||
@ -235,7 +238,7 @@ if (enable_nacl) {
|
||||
action("translate_pexe_to_nexe") {
|
||||
# We specify the toolchain explicitly because in the Non-SFI case, we
|
||||
# still want to use the pexe built using the newlib_pnacl toolchain.
|
||||
tests = ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl)"
|
||||
tests = ":ppapi_nacl_tests_nexe(//build/toolchain/nacl:newlib_pnacl)"
|
||||
|
||||
pexe = get_label_info(tests, "root_out_dir") + "/ppapi_nacl_tests.pexe"
|
||||
nexe = "${root_out_dir}/ppapi_nacl_tests.nexe"
|
||||
@ -295,26 +298,29 @@ if (enable_nacl) {
|
||||
}
|
||||
}
|
||||
|
||||
copy("nacl_tests_copy") {
|
||||
copy("ppapi_nacl_tests_copy") {
|
||||
sources = [
|
||||
"${root_out_dir}/ppapi_nacl_tests.nexe",
|
||||
]
|
||||
|
||||
# The CPU names used in tests/ppapi_nacl_tests_newlib.nmf
|
||||
# are the ones used in GYP (x32 for x86).
|
||||
if (current_cpu == "pnacl") {
|
||||
suffix = "pnacl"
|
||||
if (target_cpu == "x86" ||
|
||||
(is_nacl_nonsfi && (target_cpu == "x86" || target_cpu == "x64"))) {
|
||||
nmf_cpu = "x32"
|
||||
} else {
|
||||
if (target_cpu == "x86") {
|
||||
nmf_cpu = "x32"
|
||||
nmf_cpu = target_cpu
|
||||
}
|
||||
if (current_cpu == "pnacl") {
|
||||
if (is_nacl_nonsfi) {
|
||||
suffix = "pnacl_newlib_${nmf_cpu}_nonsfi"
|
||||
} else {
|
||||
nmf_cpu = target_cpu
|
||||
}
|
||||
if (is_nacl_glibc) {
|
||||
suffix = "glibc_${nmf_cpu}"
|
||||
} else {
|
||||
suffix = "newlib_${nmf_cpu}"
|
||||
suffix = "pnacl_newlib_${nmf_cpu}"
|
||||
}
|
||||
} else if (is_nacl_glibc) {
|
||||
suffix = "glibc_${nmf_cpu}"
|
||||
} else {
|
||||
suffix = "newlib_${nmf_cpu}"
|
||||
}
|
||||
outputs = [
|
||||
"${root_build_dir}/{{source_name_part}}_${suffix}.nexe",
|
||||
@ -325,31 +331,41 @@ if (enable_nacl) {
|
||||
]
|
||||
} else {
|
||||
deps = [
|
||||
":ppapi_nacl_tests",
|
||||
":ppapi_nacl_tests_nexe",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
generate_nmf("ppapi_nacl_tests_nmf") {
|
||||
if (is_nacl_glibc) {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf"
|
||||
stage_dependencies = root_build_dir
|
||||
} else if (current_cpu == "pnacl") {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl.nmf"
|
||||
} else {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_newlib.nmf"
|
||||
if (is_nacl_nonsfi) {
|
||||
generate_nonsfi_test_nmf("ppapi_nacl_tests_nmf") {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl_nonsfi.nmf"
|
||||
files = get_target_outputs(":ppapi_nacl_tests_copy")
|
||||
executable = files[0]
|
||||
deps = [
|
||||
":ppapi_nacl_tests_copy",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
generate_nmf("ppapi_nacl_tests_nmf") {
|
||||
if (is_nacl_glibc) {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf"
|
||||
stage_dependencies = root_build_dir
|
||||
} else if (current_cpu == "pnacl") {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl.nmf"
|
||||
} else {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_newlib.nmf"
|
||||
}
|
||||
executables = get_target_outputs(":ppapi_nacl_tests_copy")
|
||||
deps = [
|
||||
":ppapi_nacl_tests_copy",
|
||||
]
|
||||
}
|
||||
executables = get_target_outputs(":nacl_tests_copy")
|
||||
deps = [
|
||||
":nacl_tests_copy",
|
||||
]
|
||||
}
|
||||
|
||||
generate_nonsfi_test_nmf("ppapi_nacl_tests_pnacl_nonsfi_nmf") {
|
||||
nmf = "${root_build_dir}/ppapi_nacl_tests_pnacl_nonsfi.nmf"
|
||||
executable = "${root_out_dir}/ppapi_nacl_tests.nexe"
|
||||
deps = [
|
||||
":translate_pexe_to_nexe",
|
||||
group("ppapi_nacl_tests") {
|
||||
data_deps = [
|
||||
":ppapi_nacl_tests_copy",
|
||||
":ppapi_nacl_tests_nmf",
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -357,13 +373,13 @@ if (enable_nacl) {
|
||||
group("ppapi_nacl_tests_all") {
|
||||
data_deps = [
|
||||
":copy_test_files",
|
||||
":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})",
|
||||
":ppapi_nacl_tests_nmf(//build/toolchain/nacl:glibc_${target_cpu})",
|
||||
":ppapi_nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})",
|
||||
":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})",
|
||||
]
|
||||
if (enable_pnacl) {
|
||||
data_deps += [
|
||||
":ppapi_nacl_tests_nmf(//build/toolchain/nacl:newlib_pnacl)",
|
||||
":ppapi_nacl_tests_pnacl_nonsfi_nmf(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
|
||||
":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl)",
|
||||
":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -96,14 +96,14 @@ if (is_nacl) {
|
||||
}
|
||||
|
||||
group("irt") {
|
||||
public_deps = [
|
||||
data_deps = [
|
||||
":nacl_irt_debug(//build/toolchain/nacl:irt_${target_cpu})",
|
||||
":nacl_irt_debuglink(//build/toolchain/nacl:irt_${target_cpu})",
|
||||
]
|
||||
|
||||
# On 32-bit Windows, we also ship the 64-bit IRT.
|
||||
if (is_win && target_cpu == "x86") {
|
||||
public_deps += [
|
||||
data_deps += [
|
||||
":nacl_irt_debug(//build/toolchain/nacl:irt_x64)",
|
||||
":nacl_irt_debuglink(//build/toolchain/nacl:irt_x64)",
|
||||
]
|
||||
|
@ -8,7 +8,7 @@ import("//ppapi/native_client/nacl_test_data.gni")
|
||||
group("extensions") {
|
||||
newlib = "//build/toolchain/nacl:clang_newlib_${target_cpu}"
|
||||
pnacl = "//build/toolchain/nacl:newlib_pnacl"
|
||||
deps = [
|
||||
data_deps = [
|
||||
":ppapi_tests_extensions_background_keepalive($newlib)",
|
||||
":ppapi_tests_extensions_load_unload($newlib)",
|
||||
":ppapi_tests_extensions_media_galleries($newlib)",
|
||||
@ -21,7 +21,7 @@ group("extensions") {
|
||||
]
|
||||
if ((target_cpu == "x86" || target_cpu == "x64") && is_linux) {
|
||||
nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
|
||||
deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ]
|
||||
data_deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user