Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1527)

Unified Diff: ppapi/native_client/BUILD.gn

Issue 1415293005: GN: Strip NaCl IRT and save its .debug file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use bespoke action script Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/BUILD.gn ('k') | ppapi/native_client/irt_debuglink.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/BUILD.gn
diff --git a/ppapi/native_client/BUILD.gn b/ppapi/native_client/BUILD.gn
index 633bf327f5a121c741fd609e115f31a666e68e4c..93fc827848460da6d92edb8f2cd84bdc2105ce3d 100644
--- a/ppapi/native_client/BUILD.gn
+++ b/ppapi/native_client/BUILD.gn
@@ -39,31 +39,65 @@ if (is_nacl) {
]
}
- copy("nacl_irt_copy") {
- # TODO(phosek): We can remove this ugliness if we change the
- # IRT file name in components/nacl/browser/nacl_browser.cc
- if (target_cpu == "x86") {
- suffix = "x86_32"
- } else if (target_cpu == "x64") {
- suffix = "x86_64"
- } else if (target_cpu == "arm") {
- suffix = "arm"
- }
+ # TODO(phosek): We can remove this ugliness if we change the
+ # IRT file name in components/nacl/browser/nacl_browser.cc
+ if (target_cpu == "x86") {
+ irt_cpu = "x86_32"
+ } else if (target_cpu == "x64") {
+ irt_cpu = "x86_64"
+ } else {
+ irt_cpu = target_cpu
+ }
+ irt_name = "nacl_irt_" + irt_cpu + ".nexe"
+ copy("nacl_irt_debug") {
sources = [
- "${root_out_dir}/nacl_irt.nexe",
+ "${root_out_dir}/exe.unstripped/nacl_irt.nexe",
]
outputs = [
- "${root_build_dir}/{{source_name_part}}_${suffix}.nexe",
+ "${root_build_dir}/${irt_name}.debug",
+ ]
+ deps = [
+ ":nacl_irt",
]
+ }
+
+ action("nacl_irt_debuglink") {
deps = [
":nacl_irt",
+ ":nacl_irt_debug",
+ ]
+
+ objcopy = "${nacl_toolprefix}objcopy"
+ irt_stripped = "${root_out_dir}/nacl_irt.nexe"
+ irt_debug = get_target_outputs(":nacl_irt_debug")
+ irt_debug = irt_debug[0]
+ irt_final = "${root_build_dir}/${irt_name}"
+
+ inputs = [
+ objcopy,
+ ]
+ sources = [
+ irt_debug,
+ irt_stripped,
+ ]
+ outputs = [
+ irt_final,
+ ]
+
+ script = "irt_debuglink.py"
+ args = [
+ rebase_path(objcopy),
+ rebase_path(irt_debug),
+ rebase_path(irt_stripped),
+ rebase_path(irt_final),
]
}
}
group("irt") {
public_deps = [
- ":nacl_irt_copy(//build/toolchain/nacl:irt_${target_cpu})",
+ ":nacl_irt_debuglink(//build/toolchain/nacl:irt_${target_cpu})",
+ ":nacl_irt_debug(//build/toolchain/nacl:irt_${target_cpu})",
]
}
« no previous file with comments | « ppapi/BUILD.gn ('k') | ppapi/native_client/irt_debuglink.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698