| 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/toolchain/nacl_toolchain.gni") | 6 import("//build/toolchain/nacl_toolchain.gni") |
| 7 | 7 |
| 8 nacl_toolchain_dir = rebase_path("//native_client/toolchain", root_build_dir) | 8 nacl_toolchain_dir = rebase_path("//native_client/toolchain", root_build_dir) |
| 9 os_toolchain_dir = "${nacl_toolchain_dir}/${current_os}_x86" | 9 os_toolchain_dir = "${nacl_toolchain_dir}/${current_os}_x86" |
| 10 | 10 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 toolchain_revision = pnacl_newlib_rev | 146 toolchain_revision = pnacl_newlib_rev |
| 147 toolchain_cpu = "x86" | 147 toolchain_cpu = "x86" |
| 148 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-" | 148 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-" |
| 149 is_clang = true | 149 is_clang = true |
| 150 | 150 |
| 151 cc = toolprefix + "clang" | 151 cc = toolprefix + "clang" |
| 152 cxx = toolprefix + "clang++" | 152 cxx = toolprefix + "clang++" |
| 153 ar = toolprefix + "ar" | 153 ar = toolprefix + "ar" |
| 154 readelf = toolprefix + "readelf" | 154 readelf = toolprefix + "readelf" |
| 155 | 155 |
| 156 tls_edit_label = |
| 157 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)" |
| 158 host_toolchain_out_dir = |
| 159 rebase_path(get_label_info(tls_edit_label, "root_out_dir"), |
| 160 root_build_dir) |
| 161 |
| 156 # Some IRT implementations (notably, Chromium's) contain C++ code, | 162 # Some IRT implementations (notably, Chromium's) contain C++ code, |
| 157 # so we need to link w/ the C++ linker. | 163 # so we need to link w/ the C++ linker. |
| 158 ld = "${python_path} ${link_irt} --tls-edit=tls_edit --link-cmd=${cxx} --reade
lf-cmd=${readelf}" | 164 ld = "${python_path} ${link_irt} --tls-edit=${host_toolchain_out_dir}/tls_edit
--link-cmd=${cxx} --readelf-cmd=${readelf}" |
| 159 | 165 |
| 160 # TODO(ncbray): depend on link script | 166 # TODO(ncbray): depend on link script |
| 161 deps = [ | 167 deps = [ |
| 162 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)", | 168 tls_edit_label, |
| 163 ] | 169 ] |
| 164 } | 170 } |
| 165 | 171 |
| 166 nacl_toolchain("irt_x64") { | 172 nacl_toolchain("irt_x64") { |
| 167 toolchain_package = "pnacl_newlib" | 173 toolchain_package = "pnacl_newlib" |
| 168 toolchain_revision = pnacl_newlib_rev | 174 toolchain_revision = pnacl_newlib_rev |
| 169 toolchain_cpu = "x64" | 175 toolchain_cpu = "x64" |
| 170 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-" | 176 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-" |
| 171 is_clang = true | 177 is_clang = true |
| 172 | 178 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 200 | 206 |
| 201 # Some IRT implementations (notably, Chromium's) contain C++ code, | 207 # Some IRT implementations (notably, Chromium's) contain C++ code, |
| 202 # so we need to link w/ the C++ linker. | 208 # so we need to link w/ the C++ linker. |
| 203 ld = "${python_path} ${link_irt} --tls-edit=tls_edit --link-cmd=${cxx} --reade
lf-cmd=${readelf}" | 209 ld = "${python_path} ${link_irt} --tls-edit=tls_edit --link-cmd=${cxx} --reade
lf-cmd=${readelf}" |
| 204 | 210 |
| 205 # TODO(ncbray): depend on link script | 211 # TODO(ncbray): depend on link script |
| 206 deps = [ | 212 deps = [ |
| 207 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)", | 213 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)", |
| 208 ] | 214 ] |
| 209 } | 215 } |
| OLD | NEW |