James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1 | # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("//build/config/sysroot.gni") |
| 6 | import("//build/toolchain/clang.gni") |
| 7 | import("//build/toolchain/gcc_toolchain.gni") |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 8 | |
| 9 | gcc_toolchain("arm") { |
Petr Hosek | a392b30 | 2015-09-28 18:26:20 -0700 | [diff] [blame] | 10 | cc = "arm-linux-gnueabi-gcc" |
| 11 | cxx = "arm-linux-gnueabi-g++" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 12 | |
| 13 | ar = "arm-linux-gnueabi-ar" |
| 14 | ld = cxx |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 15 | readelf = "arm-linux-gnueabi-readelf" |
| 16 | nm = "arm-linux-gnueabi-nm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 17 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 18 | toolchain_cpu = "arm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 19 | toolchain_os = "linux" |
| 20 | is_clang = false |
| 21 | } |
| 22 | |
| 23 | gcc_toolchain("clang_x86") { |
| 24 | if (use_clang_type_profiler) { |
| 25 | prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", |
| 26 | root_build_dir) |
| 27 | } else { |
| 28 | prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 29 | root_build_dir) |
| 30 | } |
Petr Hosek | a392b30 | 2015-09-28 18:26:20 -0700 | [diff] [blame] | 31 | cc = "$prefix/clang" |
| 32 | cxx = "$prefix/clang++" |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 33 | readelf = "readelf" |
| 34 | nm = "nm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 35 | ar = "ar" |
| 36 | ld = cxx |
| 37 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 38 | toolchain_cpu = "x86" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 39 | toolchain_os = "linux" |
| 40 | is_clang = true |
| 41 | } |
| 42 | |
| 43 | gcc_toolchain("x86") { |
Petr Hosek | a392b30 | 2015-09-28 18:26:20 -0700 | [diff] [blame] | 44 | cc = "gcc" |
| 45 | cxx = "g++" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 46 | |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 47 | readelf = "readelf" |
| 48 | nm = "nm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 49 | ar = "ar" |
| 50 | ld = cxx |
| 51 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 52 | toolchain_cpu = "x86" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 53 | toolchain_os = "linux" |
| 54 | is_clang = false |
| 55 | } |
| 56 | |
| 57 | gcc_toolchain("clang_x64") { |
| 58 | if (use_clang_type_profiler) { |
| 59 | prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", |
| 60 | root_build_dir) |
| 61 | } else { |
| 62 | prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 63 | root_build_dir) |
| 64 | } |
Petr Hosek | a392b30 | 2015-09-28 18:26:20 -0700 | [diff] [blame] | 65 | cc = "$prefix/clang" |
| 66 | cxx = "$prefix/clang++" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 67 | |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 68 | readelf = "readelf" |
| 69 | nm = "nm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 70 | ar = "ar" |
| 71 | ld = cxx |
| 72 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 73 | toolchain_cpu = "x64" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 74 | toolchain_os = "linux" |
| 75 | is_clang = true |
| 76 | } |
| 77 | |
| 78 | gcc_toolchain("x64") { |
Petr Hosek | a392b30 | 2015-09-28 18:26:20 -0700 | [diff] [blame] | 79 | cc = "gcc" |
| 80 | cxx = "g++" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 81 | |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 82 | readelf = "readelf" |
| 83 | nm = "nm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 84 | ar = "ar" |
| 85 | ld = cxx |
| 86 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 87 | toolchain_cpu = "x64" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 88 | toolchain_os = "linux" |
| 89 | is_clang = false |
| 90 | } |
| 91 | |
| 92 | gcc_toolchain("mipsel") { |
| 93 | cc = "mipsel-linux-gnu-gcc" |
| 94 | cxx = "mipsel-linux-gnu-g++" |
| 95 | ar = "mipsel-linux-gnu-ar" |
| 96 | ld = cxx |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 97 | readelf = "mipsel-linux-gnu-readelf" |
| 98 | nm = "mipsel-linux-gnu-nm" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 99 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 100 | toolchain_cpu = "mipsel" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 101 | toolchain_os = "linux" |
| 102 | is_clang = false |
Petr Hosek | a392b30 | 2015-09-28 18:26:20 -0700 | [diff] [blame] | 103 | use_ccache = false |
| 104 | use_goma = false |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 105 | } |