| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/ccache.gni") | 6 import("//build/toolchain/ccache.gni") |
| 7 import("//build/toolchain/clang.gni") | 7 import("//build/toolchain/clang.gni") |
| 8 import("//build/toolchain/gcc_toolchain.gni") | 8 import("//build/toolchain/gcc_toolchain.gni") |
| 9 import("//build/toolchain/goma.gni") | 9 import("//build/toolchain/goma.gni") |
| 10 | 10 |
| 11 if (use_goma) { | 11 if (use_goma) { |
| 12 assert(!use_ccache, "Goma and ccache can't be used together.") | 12 assert(!use_ccache, "Goma and ccache can't be used together.") |
| 13 compiler_prefix = "$goma_dir/gomacc " | 13 compiler_prefix = "$goma_dir/gomacc " |
| 14 } else if (use_ccache) { | 14 } else if (use_ccache) { |
| 15 compiler_prefix = "ccache " | 15 compiler_prefix = "ccache " |
| 16 } else { | 16 } else { |
| 17 compiler_prefix = "" | 17 compiler_prefix = "" |
| 18 } | 18 } |
| 19 | 19 |
| 20 gcc_toolchain("arm") { | 20 gcc_toolchain("arm") { |
| 21 cc = "${compiler_prefix}arm-linux-gnueabi-gcc" | 21 cc = "${compiler_prefix}arm-linux-gnueabi-gcc" |
| 22 cxx = "${compiler_prefix}arm-linux-gnueabi-g++" | 22 cxx = "${compiler_prefix}arm-linux-gnueabi-g++" |
| 23 | 23 |
| 24 ar = "arm-linux-gnueabi-ar" | 24 ar = "arm-linux-gnueabi-ar" |
| 25 ld = cxx | 25 ld = cxx |
| 26 readelf = "arm-linux-gnueabi-readelf" |
| 27 nm = "arm-linux-gnueabi-nm" |
| 26 | 28 |
| 27 toolchain_cpu = "arm" | 29 toolchain_cpu = "arm" |
| 28 toolchain_os = "linux" | 30 toolchain_os = "linux" |
| 29 is_clang = false | 31 is_clang = false |
| 30 } | 32 } |
| 31 | 33 |
| 32 gcc_toolchain("clang_x86") { | 34 gcc_toolchain("clang_x86") { |
| 33 if (use_clang_type_profiler) { | 35 if (use_clang_type_profiler) { |
| 34 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", | 36 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", |
| 35 root_build_dir) | 37 root_build_dir) |
| 36 } else { | 38 } else { |
| 37 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 39 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 38 root_build_dir) | 40 root_build_dir) |
| 39 } | 41 } |
| 40 cc = "${compiler_prefix}$prefix/clang" | 42 cc = "${compiler_prefix}$prefix/clang" |
| 41 cxx = "${compiler_prefix}$prefix/clang++" | 43 cxx = "${compiler_prefix}$prefix/clang++" |
| 42 | 44 readelf = "readelf" |
| 45 nm = "nm" |
| 43 ar = "ar" | 46 ar = "ar" |
| 44 ld = cxx | 47 ld = cxx |
| 45 | 48 |
| 46 toolchain_cpu = "x86" | 49 toolchain_cpu = "x86" |
| 47 toolchain_os = "linux" | 50 toolchain_os = "linux" |
| 48 is_clang = true | 51 is_clang = true |
| 49 } | 52 } |
| 50 | 53 |
| 51 gcc_toolchain("x86") { | 54 gcc_toolchain("x86") { |
| 52 cc = "${compiler_prefix}gcc" | 55 cc = "${compiler_prefix}gcc" |
| 53 cxx = "$compiler_prefix}g++" | 56 cxx = "$compiler_prefix}g++" |
| 54 | 57 |
| 58 readelf = "readelf" |
| 59 nm = "nm" |
| 55 ar = "ar" | 60 ar = "ar" |
| 56 ld = cxx | 61 ld = cxx |
| 57 | 62 |
| 58 toolchain_cpu = "x86" | 63 toolchain_cpu = "x86" |
| 59 toolchain_os = "linux" | 64 toolchain_os = "linux" |
| 60 is_clang = false | 65 is_clang = false |
| 61 } | 66 } |
| 62 | 67 |
| 63 gcc_toolchain("clang_x64") { | 68 gcc_toolchain("clang_x64") { |
| 64 if (use_clang_type_profiler) { | 69 if (use_clang_type_profiler) { |
| 65 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", | 70 prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", |
| 66 root_build_dir) | 71 root_build_dir) |
| 67 } else { | 72 } else { |
| 68 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 73 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 69 root_build_dir) | 74 root_build_dir) |
| 70 } | 75 } |
| 71 cc = "${compiler_prefix}$prefix/clang" | 76 cc = "${compiler_prefix}$prefix/clang" |
| 72 cxx = "${compiler_prefix}$prefix/clang++" | 77 cxx = "${compiler_prefix}$prefix/clang++" |
| 73 | 78 |
| 79 readelf = "readelf" |
| 80 nm = "nm" |
| 74 ar = "ar" | 81 ar = "ar" |
| 75 ld = cxx | 82 ld = cxx |
| 76 | 83 |
| 77 toolchain_cpu = "x64" | 84 toolchain_cpu = "x64" |
| 78 toolchain_os = "linux" | 85 toolchain_os = "linux" |
| 79 is_clang = true | 86 is_clang = true |
| 80 } | 87 } |
| 81 | 88 |
| 82 gcc_toolchain("x64") { | 89 gcc_toolchain("x64") { |
| 83 cc = "${compiler_prefix}gcc" | 90 cc = "${compiler_prefix}gcc" |
| 84 cxx = "${compiler_prefix}g++" | 91 cxx = "${compiler_prefix}g++" |
| 85 | 92 |
| 93 readelf = "readelf" |
| 94 nm = "nm" |
| 86 ar = "ar" | 95 ar = "ar" |
| 87 ld = cxx | 96 ld = cxx |
| 88 | 97 |
| 89 toolchain_cpu = "x64" | 98 toolchain_cpu = "x64" |
| 90 toolchain_os = "linux" | 99 toolchain_os = "linux" |
| 91 is_clang = false | 100 is_clang = false |
| 92 } | 101 } |
| 93 | 102 |
| 94 gcc_toolchain("mipsel") { | 103 gcc_toolchain("mipsel") { |
| 95 cc = "mipsel-linux-gnu-gcc" | 104 cc = "mipsel-linux-gnu-gcc" |
| 96 cxx = "mipsel-linux-gnu-g++" | 105 cxx = "mipsel-linux-gnu-g++" |
| 97 ar = "mipsel-linux-gnu-ar" | 106 ar = "mipsel-linux-gnu-ar" |
| 98 ld = cxx | 107 ld = cxx |
| 108 readelf = "mipsel-linux-gnu-readelf" |
| 109 nm = "mipsel-linux-gnu-nm" |
| 99 | 110 |
| 100 toolchain_cpu = "mipsel" | 111 toolchain_cpu = "mipsel" |
| 101 toolchain_os = "linux" | 112 toolchain_os = "linux" |
| 102 is_clang = false | 113 is_clang = false |
| 103 } | 114 } |
| OLD | NEW |