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