1 # Copyright 2014 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.
5 import("//build/toolchain/gcc_toolchain.gni")
8 # The CrOS build system supports many different kinds of targets across
9 # many different architectures. Bringing your own toolchain is also supported,
10 # so it's actually impossible to enumerate all toolchains for all targets
11 # as GN toolchain specifications.
12 # These arguments provide a mechanism for specifying your CC, CXX and AR at
13 # buildfile-generation time, allowing the CrOS build system to always use
14 # the right tools for the current target.
20 gcc_toolchain("target") {
21 assert(cros_target_cc != "", "Must provide target CC.")
22 assert(cros_target_cxx != "", "Must provide target CXX.")
23 assert(cros_target_ar != "", "Must provide target AR.")
25 cc = "${cros_target_cc}"
26 cxx = "${cros_target_cxx}"
28 ar = "${cros_target_ar}"
31 toolchain_cpu = "${target_cpu}"
32 toolchain_os = "linux"