File: cros_toolchain.gni

package info (click to toggle)
chromium 138.0.7204.157-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,071,864 kB
  • sloc: cpp: 34,936,859; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,967; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (91 lines) | stat: -rw-r--r-- 3,899 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# CrOS builds must cross-compile on a Linux host for the actual CrOS
# device target. There are many different CrOS devices so the build
# system provides configuration variables that permit a CrOS build to
# control the cross-compilation tool chain. However, requiring such
# fine-grain specification is tedious for build-bots and developers.
# Consequently, the CrOS build system defaults to a convenience
# compilation mode where the compilation host is also the build target.
#
# Chrome can be compiled in this way with the gn variable:
#
# target_os = "chromeos"
#
# To perform a board-specific build, first obtain the correct system
# root (http://goo.gl/aFB4XH) for the board. Then configure GN to use it
# by setting appropriate cross-compilation variables.
#
# For example, to compile a Chrome source tree in /g/src for an
# auron_paine CrOS device with the system root cached in /g/.cros_cache,
# the following GN arguments must be provided to configure
# cross-compilation with RBE acceleration. (NB: additional variables
# will be necessary to successfully compile a working CrOS Chrome. See
# the definition of GYP_DEFINES inside a sysroot shell.)
#
# target_sysroot= /g/.cros_cache/chrome-sdk/tarballs/auron_paine+7644.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz"
# cros_target_cc = "x86_64-cros-linux-gnu-gcc -B/g/.cros_cache/chrome-sdk/tarballs/auron_paine+7657.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51-gold"
# cros_target_cxx = "x86_64-cros-linux-gnu-g++ -B/g/.cros_cache/chrome-sdk/tarballs/auron_paine+7657.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51-gold"
# cros_target_ar = "x86_64-cros-linux-gnu-gcc-ar"
# target_cpu = "x64"

import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")

declare_args() {
  # These must be specified for a board-specific build.
  cros_target_ar = "${clang_base_path}/bin/llvm-ar"
  cros_target_cc = "${clang_base_path}/bin/clang"
  cros_target_cxx = "${clang_base_path}/bin/clang++"
  cros_target_nm = ""
  cros_target_readelf = ""

  # These can be optionally set. The "_cppflags"  will be applied to *both*
  # C and C++ files; use "_cxxflags" for C++-only flags.
  cros_target_extra_cflags = ""
  cros_target_extra_cppflags = ""
  cros_target_extra_cxxflags = ""
  cros_target_extra_ldflags = ""

  cros_host_ar = "${clang_base_path}/bin/llvm-ar"
  cros_host_cc = "${clang_base_path}/bin/clang"
  cros_host_cxx = "${clang_base_path}/bin/clang++"
  cros_host_nm = ""
  cros_host_readelf = ""
  cros_host_extra_cflags = ""
  cros_host_extra_cppflags = ""
  cros_host_extra_cxxflags = ""
  cros_host_extra_ldflags = ""
  cros_host_sysroot = ""

  cros_v8_snapshot_ar = "${clang_base_path}/bin/llvm-ar"
  cros_v8_snapshot_cc = "${clang_base_path}/bin/clang"
  cros_v8_snapshot_cxx = "${clang_base_path}/bin/clang++"
  cros_v8_snapshot_nm = ""
  cros_v8_snapshot_readelf = ""
  cros_v8_snapshot_extra_cflags = ""
  cros_v8_snapshot_extra_cppflags = ""
  cros_v8_snapshot_extra_cxxflags = ""
  cros_v8_snapshot_extra_ldflags = ""
  cros_v8_snapshot_sysroot = ""

  cros_nacl_bootstrap_extra_cflags = ""
  cros_nacl_bootstrap_extra_cppflags = ""
  cros_nacl_bootstrap_extra_cxxflags = ""
  cros_nacl_bootstrap_extra_ldflags = ""

  cros_nacl_helper_arm32_ar = "${clang_base_path}/bin/llvm-ar"
  cros_nacl_helper_arm32_cc = "${clang_base_path}/bin/clang"
  cros_nacl_helper_arm32_cxx = "${clang_base_path}/bin/clang++"
  cros_nacl_helper_arm32_readelf = ""
  cros_nacl_helper_arm32_sysroot = ""
}

declare_args() {
  cros_target_ld = cros_target_cxx
  cros_host_ld = cros_host_cxx
  cros_v8_snapshot_ld = cros_v8_snapshot_cxx
  cros_nacl_helper_arm32_ld = cros_nacl_helper_arm32_cxx
}