| 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 14 matching lines...) Expand all Loading... |
| 25 pnacl_newlib_rev = revisions[2] | 25 pnacl_newlib_rev = revisions[2] |
| 26 | 26 |
| 27 nacl_toolchain("newlib_pnacl") { | 27 nacl_toolchain("newlib_pnacl") { |
| 28 toolchain_package = "pnacl_newlib" | 28 toolchain_package = "pnacl_newlib" |
| 29 toolchain_revision = pnacl_newlib_rev | 29 toolchain_revision = pnacl_newlib_rev |
| 30 toolchain_cpu = "pnacl" | 30 toolchain_cpu = "pnacl" |
| 31 toolprefix = | 31 toolprefix = |
| 32 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-", | 32 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-", |
| 33 root_build_dir) | 33 root_build_dir) |
| 34 | 34 |
| 35 executable_extension = ".pexe" |
| 36 |
| 35 is_clang = true | 37 is_clang = true |
| 36 cc = toolprefix + "clang" | 38 cc = toolprefix + "clang" |
| 37 cxx = toolprefix + "clang++" | 39 cxx = toolprefix + "clang++" |
| 38 ar = toolprefix + "ar" | 40 ar = toolprefix + "ar" |
| 39 ld = cxx | 41 ld = cxx |
| 40 executable_extension = ".pexe.debug" | |
| 41 | 42 |
| 42 finalize = toolprefix + "finalize" | 43 # The pnacl-finalize tool turns a .pexe.debug file into a .pexe file. |
| 43 nonfinal_file = | 44 # It's very similar in purpose to the traditional "strip" utility: it |
| 44 "{{root_out_dir}}/{{target_output_name}}${executable_extension}" | 45 # turns what comes out of the linker into what you actually want to |
| 45 finalized_file = "{{root_out_dir}}/{{target_output_name}}.pexe" | 46 # distribute and run. PNaCl doesn't have a "strip"-like utility that |
| 46 postlink = "$finalize $nonfinal_file -o $finalized_file" | 47 # you ever actually want to use other than pnacl-finalize, so just |
| 47 link_outputs = [ finalized_file ] | 48 # make pnacl-finalize the strip tool rather than adding an additional |
| 49 # step like "postlink" to run pnacl-finalize. |
| 50 strip = toolprefix + "finalize" |
| 48 } | 51 } |
| 49 | 52 |
| 50 nacl_toolchain("newlib_pnacl_nonsfi") { | 53 nacl_toolchain("newlib_pnacl_nonsfi") { |
| 51 toolchain_package = "pnacl_newlib" | 54 toolchain_package = "pnacl_newlib" |
| 52 toolchain_revision = pnacl_newlib_rev | 55 toolchain_revision = pnacl_newlib_rev |
| 53 toolchain_cpu = "pnacl" | 56 toolchain_cpu = "pnacl" |
| 54 toolprefix = | 57 toolprefix = |
| 55 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-", | 58 rebase_path("${nacl_toolchain_dir}/${toolchain_package}/bin/pnacl-", |
| 56 root_build_dir) | 59 root_build_dir) |
| 57 | 60 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 toolchain_tuple = "i686-nacl" | 185 toolchain_tuple = "i686-nacl" |
| 183 } | 186 } |
| 184 | 187 |
| 185 nacl_clang_toolchains("x64") { | 188 nacl_clang_toolchains("x64") { |
| 186 toolchain_tuple = "x86_64-nacl" | 189 toolchain_tuple = "x86_64-nacl" |
| 187 } | 190 } |
| 188 | 191 |
| 189 nacl_clang_toolchains("arm") { | 192 nacl_clang_toolchains("arm") { |
| 190 toolchain_tuple = "arm-nacl" | 193 toolchain_tuple = "arm-nacl" |
| 191 } | 194 } |
| OLD | NEW |