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

Side by Side Diff: build/toolchain/nacl/BUILD.gn

Issue 1452723002: GN: Disable strip in newlib_pnacl_nonsfi toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2014 The Native Client 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/sysroot.gni") 5 import("//build/config/sysroot.gni")
6 import("//build/config/nacl/config.gni") 6 import("//build/config/nacl/config.gni")
7 import("//build/toolchain/nacl_toolchain.gni") 7 import("//build/toolchain/nacl_toolchain.gni")
8 8
9 # Add the toolchain revision as a preprocessor define so that sources are 9 # Add the toolchain revision as a preprocessor define so that sources are
10 # rebuilt when a toolchain is updated. 10 # rebuilt when a toolchain is updated.
(...skipping 10 matching lines...) Expand all
21 ], 21 ],
22 "trim list lines") 22 "trim list lines")
23 nacl_x86_glibc_rev = revisions[0] 23 nacl_x86_glibc_rev = revisions[0]
24 nacl_arm_glibc_rev = revisions[1] 24 nacl_arm_glibc_rev = revisions[1]
25 25
26 # TODO(mcgrathr): Uncomment this when 26 # TODO(mcgrathr): Uncomment this when
27 # https://code.google.com/p/chromium/issues/detail?id=555724 is fixed. 27 # https://code.google.com/p/chromium/issues/detail?id=555724 is fixed.
28 #pnacl_newlib_rev = revisions[2] 28 #pnacl_newlib_rev = revisions[2]
29 29
30 template("pnacl_toolchain") { 30 template("pnacl_toolchain") {
31 assert(defined(invoker.strip), "Must define strip")
32 assert(defined(invoker.executable_extension), 31 assert(defined(invoker.executable_extension),
33 "Must define executable_extension") 32 "Must define executable_extension")
34 33
35 # TODO(mcgrathr): See above. 34 # TODO(mcgrathr): See above.
36 pnacl_newlib_rev = revisions[2] 35 pnacl_newlib_rev = revisions[2]
37 36
38 nacl_toolchain(target_name) { 37 nacl_toolchain(target_name) {
39 toolchain_package = "pnacl_newlib" 38 toolchain_package = "pnacl_newlib"
40 toolchain_revision = pnacl_newlib_rev 39 toolchain_revision = pnacl_newlib_rev
41 toolchain_cpu = "pnacl" 40 toolchain_cpu = "pnacl"
42 toolprefix = 41 toolprefix =
43 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-", 42 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-",
44 root_build_dir) 43 root_build_dir)
45 44
46 is_clang = true 45 is_clang = true
47 cc = toolprefix + "clang" 46 cc = toolprefix + "clang"
48 cxx = toolprefix + "clang++" 47 cxx = toolprefix + "clang++"
49 ar = toolprefix + "ar" 48 ar = toolprefix + "ar"
50 ld = cxx 49 ld = cxx
51 strip = toolprefix + invoker.strip 50 if (defined(invoker.strip)) {
51 strip = toolprefix + invoker.strip
52 }
52 executable_extension = invoker.executable_extension 53 executable_extension = invoker.executable_extension
53 } 54 }
54 } 55 }
55 56
56 pnacl_toolchain("newlib_pnacl") { 57 pnacl_toolchain("newlib_pnacl") {
57 executable_extension = ".pexe" 58 executable_extension = ".pexe"
58 59
59 # The pnacl-finalize tool turns a .pexe.debug file into a .pexe file. 60 # The pnacl-finalize tool turns a .pexe.debug file into a .pexe file.
60 # It's very similar in purpose to the traditional "strip" utility: it 61 # It's very similar in purpose to the traditional "strip" utility: it
61 # turns what comes out of the linker into what you actually want to 62 # turns what comes out of the linker into what you actually want to
62 # distribute and run. PNaCl doesn't have a "strip"-like utility that 63 # distribute and run. PNaCl doesn't have a "strip"-like utility that
63 # you ever actually want to use other than pnacl-finalize, so just 64 # you ever actually want to use other than pnacl-finalize, so just
64 # make pnacl-finalize the strip tool rather than adding an additional 65 # make pnacl-finalize the strip tool rather than adding an additional
65 # step like "postlink" to run pnacl-finalize. 66 # step like "postlink" to run pnacl-finalize.
66 strip = "finalize" 67 strip = "finalize"
67 } 68 }
68 69
69 pnacl_toolchain("newlib_pnacl_nonsfi") { 70 pnacl_toolchain("newlib_pnacl_nonsfi") {
70 executable_extension = "" 71 executable_extension = ""
71 72 # TODO(mcgrathr): Uncomment this after pnacl-strip has been taught
72 strip = "strip" 73 # to grok --strip-unneeded.
74 #strip = "strip"
73 } 75 }
74 76
75 template("nacl_glibc_toolchain") { 77 template("nacl_glibc_toolchain") {
76 toolchain_cpu = target_name 78 toolchain_cpu = target_name
77 assert(defined(invoker.toolchain_tuple), "Must define toolchain_tuple") 79 assert(defined(invoker.toolchain_tuple), "Must define toolchain_tuple")
78 assert(defined(invoker.toolchain_package), "Must define toolchain_package") 80 assert(defined(invoker.toolchain_package), "Must define toolchain_package")
79 assert(defined(invoker.toolchain_revision), "Must define toolchain_revision") 81 assert(defined(invoker.toolchain_revision), "Must define toolchain_revision")
80 forward_variables_from(invoker, 82 forward_variables_from(invoker,
81 [ 83 [
82 "toolchain_package", 84 "toolchain_package",
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 toolchain_tuple = "i686-nacl" 199 toolchain_tuple = "i686-nacl"
198 } 200 }
199 201
200 nacl_clang_toolchains("x64") { 202 nacl_clang_toolchains("x64") {
201 toolchain_tuple = "x86_64-nacl" 203 toolchain_tuple = "x86_64-nacl"
202 } 204 }
203 205
204 nacl_clang_toolchains("arm") { 206 nacl_clang_toolchains("arm") {
205 toolchain_tuple = "arm-nacl" 207 toolchain_tuple = "arm-nacl"
206 } 208 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698