• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:rust

2 # Use of this source code is governed by a BSD-style license that can be
5 import("//build/config/chrome_build.gni")
6 import("//build/config/compiler/compiler.gni")
7 import("//build/config/sanitizers/sanitizers.gni")
8 import("//build/toolchain/toolchain.gni")
11 import("//build/config/android/config.gni")
15 import("//build/config/ios/config.gni") # For `target_environment`
16 import("//build/config/ios/ios_sdk.gni") # For `xcode_version_int`
20 # Rust is available in the Chromium build but 3p repos that use //build may
21 # not use Rust and thus won't want to depend on having the Rust toolchain
24 # Chromium-based projects that are built for for architectures Chrome does not
29 # The CXX tool is in //third_party/rust which is not shared with downstream
34 # As we incrementally enable Rust on mainstream builders, we want to enable
36 # almost all Rust features). Yet we still want to have some builders with
37 # all Rust features enabled.
40 # Chromium provides a Rust toolchain in //third_party/rust-toolchain when
44 # a Rust sysroot, which will have a 'bin' directory and others. Commonly
45 # <home dir>/.rustup/toolchains/nightly-<something>-<something>
48 # If you're using a Rust toolchain as specified by rust_sysroot_absolute,
49 # set this to the output of `rustc -V`. Changing this string will cause all
50 # Rust targets to be rebuilt, which allows you to update your toolchain and
54 # If you're using a Rust toolchain as specified by rust_sysroot_absolute,
58 # Any extra std rlibs in your Rust toolchain, relative to the standard
59 # Rust toolchain. Typically used with 'rust_sysroot_absolute'
62 # Any removed std rlibs in your Rust toolchain, relative to the standard
63 # Rust toolchain. Typically used with 'rust_sysroot_absolute'
66 # Non-rlib libs provided in the toolchain sysroot. Usually this is empty, but
67 # e.g. the Android Rust Toolchain provides a libunwind.a that rustc expects.
70 # Use goma for Rust builds. Experimental. The only known problem is
71 # b/193072381, but then again, we don't expect a build speedup before much
75 # Force-enable `--color=always` for rustc, even when it would be disabled for
84 # Individual Rust components.
86 # Conversions between Rust types and C++ types.
92 # Support for chrome://crash-rust to check crash dump collection works.
95 # Support for Rust mojo bindings.
98 # Rust gtest interop.
101 # Enable Boringssl Rust bindings generation
104 # Enable experimental Fontations Rust font stack.
108 # Use the Rust toolchain built in-tree. When false, we use the prebuilt Rust
112 # Platform support for the Rust toolchain.
116 # Not all target triples (GN toolchains) are supported by the Rust compiler.
121 # (so e.g. rust targets are rebuilt, and the standard library is re-copied when
129 update_rust_args = [ "--print-package-version" ]
130 rustc_revision = exec_script("//tools/rust/update_rust.py",
143 # TODO(crbug.com/1278030): To build unit tests for Android we need to build
148 # Whether artifacts produced by the Rust compiler can participate in ThinLTO.
151 # version as `rustc` (i.e. if it can understand the LLVM-IR from the
153 # not be true - see b/299483903.
155 # TODO(https://crbug.com/1482525): Re-enable ThinLTO for Rust on LaCrOS
156 # TODO(b/300937673): Re-enable ThinLTO for Rust on ash-chrome
159 # We want to store rust_sysroot as a source-relative variable for ninja
164 rust_sysroot = "//third_party/rust-toolchain"
170 # bindgen we ship with the Rust toolchain. This could be made configurable
172 rust_bindgen_root = "//third_party/rust-toolchain"
175 # Figure out the Rust target triple (aka 'rust_abi_target')
178 # //build/rust/std to find the Rust standard library and construct a sysroot for
181 # The list of architectures supported by Rust is here:
182 # https://doc.rust-lang.org/nightly/rustc/platform-support.html. We map Chromium
183 # targets to Rust targets comprehensively despite not having official support
189 rust_abi_target = "aarch64-unknown-linux-gnu"
191 rust_abi_target = "i686-unknown-linux-gnu"
193 rust_abi_target = "x86_64-unknown-linux-gnu"
200 if (arm_arch == "armv7-a" || arm_arch == "armv7") {
201 # No way to inform Rust about the -a suffix.
202 rust_abi_target = "armv7-unknown-linux-gnueabi" + float_suffix
204 rust_abi_target = "arm-unknown-linux-gnueabi" + float_suffix
208 rust_abi_target = current_cpu + "-unknown-linux-gnu"
211 import("//build/config/android/abi.gni")
213 if (rust_abi_target == "arm-linux-androideabi") {
214 # Android clang target specifications mostly match Rust, but this
216 rust_abi_target = "armv7-linux-androideabi"
220 rust_abi_target = "aarch64-fuchsia"
222 rust_abi_target = "x86_64-fuchsia"
229 rust_abi_target = "aarch64-apple-ios-sim"
231 rust_abi_target = "aarch64-apple-ios-macabi"
233 rust_abi_target = "aarch64-apple-ios"
236 # There's also an armv7s-apple-ios, which targets a more recent ARMv7
239 # with Rust, we might want to be more precise here.
240 rust_abi_target = "armv7-apple-ios"
243 rust_abi_target = "x86_64-apple-ios-macabi"
245 rust_abi_target = "x86_64-apple-ios"
248 rust_abi_target = "i386-apple-ios"
254 rust_abi_target = "aarch64-apple-darwin"
256 rust_abi_target = "x86_64-apple-darwin"
262 rust_abi_target = "aarch64-pc-windows-msvc"
264 rust_abi_target = "x86_64-pc-windows-msvc"
266 rust_abi_target = "i686-pc-windows-msvc"
274 # This variable is passed to the Rust libstd build.
298 # Arguments for Rust invocation.
300 # here. This is not the complete command-line: toolchains should add -o
301 # and probably --emit arguments too.
302 rustc_common_args = "--crate-name {{crate_name}} {{source}} --crate-type {{crate_type}} {{rustflags…
304 # Rust procedural macros are shared objects loaded into a prebuilt host rustc
305 # binary. To build them, we obviously need to build for the host. Not only
317 # When this is true, a prebuilt Rust stdlib will be used. This has implications