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