OLD | NEW |
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 29 matching lines...) Expand all Loading... |
40 executable_extension = ".pexe.debug" | 40 executable_extension = ".pexe.debug" |
41 | 41 |
42 finalize = toolprefix + "finalize" | 42 finalize = toolprefix + "finalize" |
43 nonfinal_file = | 43 nonfinal_file = |
44 "{{root_out_dir}}/{{target_output_name}}${executable_extension}" | 44 "{{root_out_dir}}/{{target_output_name}}${executable_extension}" |
45 finalized_file = "{{root_out_dir}}/{{target_output_name}}.pexe" | 45 finalized_file = "{{root_out_dir}}/{{target_output_name}}.pexe" |
46 postlink = "$finalize $nonfinal_file -o $finalized_file" | 46 postlink = "$finalize $nonfinal_file -o $finalized_file" |
47 link_outputs = [ finalized_file ] | 47 link_outputs = [ finalized_file ] |
48 } | 48 } |
49 | 49 |
| 50 nacl_toolchain("newlib_pnacl_nonsfi") { |
| 51 toolchain_package = "pnacl_newlib" |
| 52 toolchain_revision = pnacl_newlib_rev |
| 53 toolchain_cpu = "pnacl" |
| 54 toolprefix = |
| 55 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-", |
| 56 root_build_dir) |
| 57 |
| 58 is_clang = true |
| 59 cc = toolprefix + "clang" |
| 60 cxx = toolprefix + "clang++" |
| 61 ar = toolprefix + "ar" |
| 62 ld = cxx |
| 63 executable_extension = "" |
| 64 } |
| 65 |
50 template("nacl_glibc_toolchain") { | 66 template("nacl_glibc_toolchain") { |
51 toolchain_cpu = target_name | 67 toolchain_cpu = target_name |
52 assert(defined(invoker.toolchain_tuple), "Must define toolchain_tuple") | 68 assert(defined(invoker.toolchain_tuple), "Must define toolchain_tuple") |
53 assert(defined(invoker.toolchain_package), "Must define toolchain_package") | 69 assert(defined(invoker.toolchain_package), "Must define toolchain_package") |
54 assert(defined(invoker.toolchain_revision), "Must define toolchain_revision") | 70 assert(defined(invoker.toolchain_revision), "Must define toolchain_revision") |
55 forward_variables_from(invoker, | 71 forward_variables_from(invoker, |
56 [ | 72 [ |
57 "toolchain_package", | 73 "toolchain_package", |
58 "toolchain_revision", | 74 "toolchain_revision", |
59 ]) | 75 ]) |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 toolchain_tuple = "i686-nacl" | 181 toolchain_tuple = "i686-nacl" |
166 } | 182 } |
167 | 183 |
168 nacl_clang_toolchains("x64") { | 184 nacl_clang_toolchains("x64") { |
169 toolchain_tuple = "x86_64-nacl" | 185 toolchain_tuple = "x86_64-nacl" |
170 } | 186 } |
171 | 187 |
172 nacl_clang_toolchains("arm") { | 188 nacl_clang_toolchains("arm") { |
173 toolchain_tuple = "arm-nacl" | 189 toolchain_tuple = "arm-nacl" |
174 } | 190 } |
OLD | NEW |