blob: 19cf42f6b811af6dfcaf4da4007ed38540cfe08c [file] [log] [blame]
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/compiler/compiler.gni")
import("//build/config/sysroot.gni")
import("//build/toolchain/cros_toolchain.gni")
import("//build/toolchain/gcc_toolchain.gni")
# This is the normal toolchain for most targets.
clang_toolchain("target") {
toolchain_args = {
current_cpu = target_cpu
current_os = "chromeos"
sysroot = target_sysroot
}
extra_cflags = cros_target_extra_cflags
extra_cppflags = cros_target_extra_cppflags
extra_cxxflags = cros_target_extra_cxxflags
extra_ldflags = cros_target_extra_ldflags
}
clang_toolchain("host") {
toolchain_args = {
current_cpu = host_cpu
current_os = "linux"
sysroot = cros_host_sysroot
}
extra_cflags = cros_host_extra_cflags
extra_cppflags = cros_host_extra_cppflags
extra_cxxflags = cros_host_extra_cxxflags
extra_ldflags = cros_host_extra_ldflags
}
clang_toolchain("v8_snapshot") {
toolchain_args = {
if (target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel") {
current_cpu = "x86"
} else {
current_cpu = "x64"
}
v8_current_cpu = v8_target_cpu
current_os = "linux"
sysroot = cros_v8_snapshot_sysroot
}
extra_cflags = cros_v8_snapshot_extra_cflags
extra_cppflags = cros_v8_snapshot_extra_cppflags
extra_cxxflags = cros_v8_snapshot_extra_cxxflags
extra_ldflags = cros_v8_snapshot_extra_ldflags
}