1# Copyright 2017 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/toolchain/gcc_toolchain.gni") 6 7gcc_toolchain("default") { 8 cc = getenv("CC") 9 cxx = getenv("CXX") 10 ar = getenv("AR") 11 nm = getenv("NM") 12 ld = cxx 13 14 extra_cflags = getenv("CFLAGS") 15 extra_cppflags = getenv("CPPFLAGS") 16 extra_cxxflags = getenv("CXXFLAGS") 17 extra_ldflags = getenv("LDFLAGS") 18 19 toolchain_args = { 20 current_cpu = current_cpu 21 current_os = current_os 22 } 23} 24 25gcc_toolchain("host") { 26 cc = getenv("BUILD_CC") 27 cxx = getenv("BUILD_CXX") 28 ar = getenv("BUILD_AR") 29 nm = getenv("BUILD_NM") 30 ld = cxx 31 32 extra_cflags = getenv("BUILD_CFLAGS") 33 extra_cppflags = getenv("BUILD_CPPFLAGS") 34 extra_cxxflags = getenv("BUILD_CXXFLAGS") 35 extra_ldflags = getenv("BUILD_LDFLAGS") 36 37 toolchain_args = { 38 current_cpu = current_cpu 39 current_os = current_os 40 } 41} 42