126 lines
2.3 KiB
Plaintext
Executable File
126 lines
2.3 KiB
Plaintext
Executable File
# Copyright 2013 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/sysroot.gni")
|
|
import("//build/toolchain/gcc_toolchain.gni")
|
|
|
|
if (!build_cross_platform_version) {
|
|
import("//build/rust/rustc_toolchain.gni")
|
|
}
|
|
|
|
clang_toolchain("clang_arm") {
|
|
toolprefix = "arm-linux-gnueabihf-"
|
|
toolchain_args = {
|
|
current_cpu = "arm"
|
|
current_os = "linux"
|
|
}
|
|
}
|
|
|
|
clang_toolchain("clang_arm64") {
|
|
toolprefix = "aarch64-linux-gnu-"
|
|
toolchain_args = {
|
|
current_cpu = "arm64"
|
|
current_os = "linux"
|
|
}
|
|
}
|
|
|
|
gcc_toolchain("arm64") {
|
|
toolprefix = "aarch64-linux-gnu-"
|
|
|
|
cc = "${toolprefix}gcc"
|
|
cxx = "${toolprefix}g++"
|
|
|
|
ar = "${toolprefix}ar"
|
|
ld = cxx
|
|
readelf = "${toolprefix}readelf"
|
|
nm = "${toolprefix}nm"
|
|
|
|
toolchain_args = {
|
|
current_cpu = "arm64"
|
|
current_os = "linux"
|
|
is_clang = false
|
|
}
|
|
}
|
|
|
|
gcc_toolchain("arm") {
|
|
toolprefix = "arm-linux-gnueabihf-"
|
|
|
|
cc = "${toolprefix}gcc"
|
|
cxx = "${toolprefix}g++"
|
|
|
|
ar = "${toolprefix}ar"
|
|
ld = cxx
|
|
readelf = "${toolprefix}readelf"
|
|
nm = "${toolprefix}nm"
|
|
|
|
toolchain_args = {
|
|
current_cpu = "arm"
|
|
current_os = "linux"
|
|
is_clang = false
|
|
}
|
|
}
|
|
|
|
clang_toolchain("clang_x86") {
|
|
# Output linker map files for binary size analysis.
|
|
enable_linker_map = true
|
|
|
|
toolchain_args = {
|
|
current_cpu = "x86"
|
|
current_os = "linux"
|
|
}
|
|
}
|
|
|
|
gcc_toolchain("x86") {
|
|
cc = "gcc"
|
|
cxx = "g++"
|
|
|
|
readelf = "readelf"
|
|
nm = "nm"
|
|
ar = "ar"
|
|
ld = cxx
|
|
|
|
# Output linker map files for binary size analysis.
|
|
enable_linker_map = true
|
|
|
|
toolchain_args = {
|
|
current_cpu = "x86"
|
|
current_os = "linux"
|
|
is_clang = false
|
|
}
|
|
}
|
|
|
|
clang_toolchain("clang_x64") {
|
|
# Output linker map files for binary size analysis.
|
|
enable_linker_map = true
|
|
|
|
strip = rebase_path("${clang_base_path}/bin/llvm-strip", root_build_dir)
|
|
toolchain_args = {
|
|
current_cpu = "x64"
|
|
current_os = "linux"
|
|
}
|
|
shlib_extension = ".so"
|
|
if (!build_cross_platform_version) {
|
|
rust_abi_target = "x86_64-unknown-linux-gnu"
|
|
}
|
|
}
|
|
|
|
gcc_toolchain("x64") {
|
|
cc = "gcc"
|
|
cxx = "g++"
|
|
|
|
readelf = "readelf"
|
|
nm = "nm"
|
|
ar = "ar"
|
|
ld = cxx
|
|
|
|
# Output linker map files for binary size analysis.
|
|
enable_linker_map = true
|
|
|
|
toolchain_args = {
|
|
current_cpu = "x64"
|
|
current_os = "linux"
|
|
is_clang = false
|
|
}
|
|
}
|