| 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 |
| 11 # Add the toolchain revision as a preprocessor define so that sources are | 11 # Add the toolchain revision as a preprocessor define so that sources are |
| 12 # rebuilt when a toolchain is updated. | 12 # rebuilt when a toolchain is updated. |
| 13 # Idea we could use the toolchain deps feature, but currently that feature is | 13 # Idea we could use the toolchain deps feature, but currently that feature is |
| 14 # bugged and does not trigger a rebuild. | 14 # bugged and does not trigger a rebuild. |
| 15 # https://code.google.com/p/chromium/issues/detail?id=431880 | 15 # https://code.google.com/p/chromium/issues/detail?id=431880 |
| 16 # Calls to get the toolchain revision are relatively slow, so do them all in a | 16 # Calls to get the toolchain revision are relatively slow, so do them all in a |
| 17 # single batch to amortize python startup, etc. | 17 # single batch to amortize python startup, etc. |
| 18 revisions = exec_script("//native_client/build/get_toolchain_revision.py", | 18 revisions = exec_script("//native_client/build/get_toolchain_revision.py", |
| 19 [ | 19 [ |
| 20 "nacl_arm_newlib", | |
| 21 "nacl_x86_newlib", | |
| 22 "nacl_x86_glibc", | 20 "nacl_x86_glibc", |
| 23 "pnacl_newlib", | 21 "pnacl_newlib", |
| 24 ], | 22 ], |
| 25 "trim list lines") | 23 "trim list lines") |
| 26 nacl_arm_newlib_rev = revisions[0] | 24 nacl_x86_glibc_rev = revisions[0] |
| 27 nacl_x86_newlib_rev = revisions[1] | 25 pnacl_newlib_rev = revisions[1] |
| 28 nacl_x86_glibc_rev = revisions[2] | |
| 29 pnacl_newlib_rev = revisions[3] | |
| 30 | |
| 31 nacl_toolchain("newlib_arm") { | |
| 32 toolchain_package = "nacl_arm_newlib" | |
| 33 toolchain_revision = nacl_arm_newlib_rev | |
| 34 toolchain_cpu = "arm" | |
| 35 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/arm-nacl-" | |
| 36 is_clang = false | |
| 37 | |
| 38 cc = toolprefix + "gcc" | |
| 39 cxx = toolprefix + "g++" | |
| 40 ar = toolprefix + "ar" | |
| 41 ld = cxx | |
| 42 } | |
| 43 | |
| 44 nacl_toolchain("newlib_x86") { | |
| 45 toolchain_package = "nacl_x86_newlib" | |
| 46 toolchain_revision = nacl_x86_newlib_rev | |
| 47 toolchain_cpu = "x86" | |
| 48 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-" | |
| 49 is_clang = false | |
| 50 | |
| 51 cc = toolprefix + "gcc" | |
| 52 cxx = toolprefix + "g++" | |
| 53 ar = toolprefix + "ar" | |
| 54 ld = cxx | |
| 55 } | |
| 56 | |
| 57 nacl_toolchain("newlib_x64") { | |
| 58 toolchain_package = "nacl_x86_newlib" | |
| 59 toolchain_revision = nacl_x86_newlib_rev | |
| 60 toolchain_cpu = "x64" | |
| 61 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-" | |
| 62 is_clang = false | |
| 63 | |
| 64 cc = toolprefix + "gcc" | |
| 65 cxx = toolprefix + "g++" | |
| 66 ar = toolprefix + "ar" | |
| 67 ld = cxx | |
| 68 } | |
| 69 | 26 |
| 70 nacl_toolchain("newlib_pnacl") { | 27 nacl_toolchain("newlib_pnacl") { |
| 71 toolchain_package = "pnacl_newlib" | 28 toolchain_package = "pnacl_newlib" |
| 72 toolchain_revision = pnacl_newlib_rev | 29 toolchain_revision = pnacl_newlib_rev |
| 73 toolchain_cpu = "pnacl" | 30 toolchain_cpu = "pnacl" |
| 74 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/pnacl-" | 31 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/pnacl-" |
| 75 | 32 |
| 76 cc = toolprefix + "clang" | 33 cc = toolprefix + "clang" |
| 77 cxx = toolprefix + "clang++" | 34 cxx = toolprefix + "clang++" |
| 78 ar = toolprefix + "ar" | 35 ar = toolprefix + "ar" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 toolchain_tuple = "i686-nacl" | 136 toolchain_tuple = "i686-nacl" |
| 180 } | 137 } |
| 181 | 138 |
| 182 nacl_irt_toolchain("x64") { | 139 nacl_irt_toolchain("x64") { |
| 183 toolchain_tuple = "x86_64-nacl" | 140 toolchain_tuple = "x86_64-nacl" |
| 184 } | 141 } |
| 185 | 142 |
| 186 nacl_irt_toolchain("arm") { | 143 nacl_irt_toolchain("arm") { |
| 187 toolchain_tuple = "arm-nacl" | 144 toolchain_tuple = "arm-nacl" |
| 188 } | 145 } |
| OLD | NEW |