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

Side by Side 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, 1 month 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 unified diff | Download patch
« no previous file with comments | « ppapi/BUILD.gn ('k') | ppapi/native_client/irt_debuglink.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/nacl/config.gni") 6 import("//build/config/nacl/config.gni")
7 7
8 if (is_nacl) { 8 if (is_nacl) {
9 group("ppapi_lib") { 9 group("ppapi_lib") {
10 deps = [ 10 deps = [
(...skipping 21 matching lines...) Expand all
32 "//native_client/src/tools/tls_edit($host_toolchain)", 32 "//native_client/src/tools/tls_edit($host_toolchain)",
33 "//native_client/src/untrusted/nacl:imc_syscalls", 33 "//native_client/src/untrusted/nacl:imc_syscalls",
34 "//native_client/src/shared/gio", 34 "//native_client/src/shared/gio",
35 "//ppapi/native_client/src/untrusted/pnacl_irt_shim:irt", 35 "//ppapi/native_client/src/untrusted/pnacl_irt_shim:irt",
36 "//ppapi/proxy", 36 "//ppapi/proxy",
37 "//ppapi/proxy:ipc", 37 "//ppapi/proxy:ipc",
38 "//ppapi/shared_impl", 38 "//ppapi/shared_impl",
39 ] 39 ]
40 } 40 }
41 41
42 copy("nacl_irt_copy") { 42 # TODO(phosek): We can remove this ugliness if we change the
43 # TODO(phosek): We can remove this ugliness if we change the 43 # IRT file name in components/nacl/browser/nacl_browser.cc
44 # IRT file name in components/nacl/browser/nacl_browser.cc 44 if (target_cpu == "x86") {
45 if (target_cpu == "x86") { 45 irt_cpu = "x86_32"
46 suffix = "x86_32" 46 } else if (target_cpu == "x64") {
47 } else if (target_cpu == "x64") { 47 irt_cpu = "x86_64"
48 suffix = "x86_64" 48 } else {
49 } else if (target_cpu == "arm") { 49 irt_cpu = target_cpu
50 suffix = "arm" 50 }
51 } 51 irt_name = "nacl_irt_" + irt_cpu + ".nexe"
52 52
53 copy("nacl_irt_debug") {
53 sources = [ 54 sources = [
54 "${root_out_dir}/nacl_irt.nexe", 55 "${root_out_dir}/exe.unstripped/nacl_irt.nexe",
55 ] 56 ]
56 outputs = [ 57 outputs = [
57 "${root_build_dir}/{{source_name_part}}_${suffix}.nexe", 58 "${root_build_dir}/${irt_name}.debug",
58 ] 59 ]
59 deps = [ 60 deps = [
60 ":nacl_irt", 61 ":nacl_irt",
61 ] 62 ]
62 } 63 }
64
65 action("nacl_irt_debuglink") {
66 deps = [
67 ":nacl_irt",
68 ":nacl_irt_debug",
69 ]
70
71 objcopy = "${nacl_toolprefix}objcopy"
72 irt_stripped = "${root_out_dir}/nacl_irt.nexe"
73 irt_debug = get_target_outputs(":nacl_irt_debug")
74 irt_debug = irt_debug[0]
75 irt_final = "${root_build_dir}/${irt_name}"
76
77 inputs = [
78 objcopy,
79 ]
80 sources = [
81 irt_debug,
82 irt_stripped,
83 ]
84 outputs = [
85 irt_final,
86 ]
87
88 script = "irt_debuglink.py"
89 args = [
90 rebase_path(objcopy),
91 rebase_path(irt_debug),
92 rebase_path(irt_stripped),
93 rebase_path(irt_final),
94 ]
95 }
63 } 96 }
64 97
65 group("irt") { 98 group("irt") {
66 public_deps = [ 99 public_deps = [
67 ":nacl_irt_copy(//build/toolchain/nacl:irt_${target_cpu})", 100 ":nacl_irt_debuglink(//build/toolchain/nacl:irt_${target_cpu})",
101 ":nacl_irt_debug(//build/toolchain/nacl:irt_${target_cpu})",
68 ] 102 ]
69 } 103 }
OLDNEW
« 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