# Copyright 2023 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # @generated from build/rust/std/BUILD.gn.hbs by tools/crates/gnrt. Do not edit! import("//build/rust/cargo_crate.gni") {{#each rules}} {{#with this.detail}} cargo_crate("{{../name}}") { crate_type = "{{crate_type}}" crate_root = "{{crate_root}}" sources = [ {{#each sources}} "{{this}}", {{/each}} ] inputs = [ {{#each inputs}} "{{this}}", {{/each}} ] no_std = true # Unit tests skipped. Generate with --with-tests to include them. build_native_rust_unit_tests = false edition = "{{edition}}" cargo_pkg_version = "{{cargo_pkg_version}}" {{#with cargo_pkg_authors}} cargo_pkg_authors = "{{this}}" {{/with}} cargo_pkg_name = "{{cargo_pkg_name}}" {{#with cargo_pkg_description}} cargo_pkg_description = "{{gn_escape this}}" {{/with}} library_configs -= [ "//build/config/compiler:chromium_code", {{#each remove_library_configs}} "{{this}}", {{/each}} {{#unless extra_kv.include_coverage}} "//build/config/coverage:default_coverage", {{/unless}} ] library_configs += [ "//build/config/compiler:no_chromium_code", {{#if extra_kv.immediate_abort}} "//build/rust:panic_immediate_abort", {{/if}} ] executable_configs -= [ "//build/config/compiler:chromium_code", {{#each remove_executable_configs}} "{{this}}", {{/each}} ] executable_configs += [ "//build/config/compiler:no_chromium_code", {{#each add_executable_configs}} "{{this}}", {{/each}} ] deps = [ "//build/rust/std:std_build_deps", {{#if extra_kv.include_coverage}} "//build/rust/std:profiler_builtins_group", {{/if}} {{#unless deps}} ] {{/unless}} {{#each deps}} {{#if @first}} {{#each this.packages}} ":{{this.name}}", {{/each}} ] {{else}} if ({{this.cond}}) { deps += [ {{#each this.packages}} ":{{this.name}}", {{/each}} ] } {{/if}} {{/each}} {{#if aliased_deps}} aliased_deps = { {{#each aliased_deps}} {{this.0}} = "{{this.1}}" {{/each}} } {{/if}} {{#if features}} features = [ {{#each features}} "{{this}}", {{/each}} ] {{/if}} {{#unless extra_kv.skip_build_rs}} {{#if build_root}} build_root = "{{build_root}}" build_sources = [ {{#each build_script_sources}} "{{this}}", {{/each}} ] {{#with build_script_inputs}} build_script_inputs = [ {{#each this}} "{{this}}", {{/each}} ] {{/with}} {{#with build_script_outputs}} build_script_outputs = [ {{#each this}} "{{this}}", {{/each}} ] {{/with}} {{#each build_deps}} {{#if @first}} build_deps = [ {{#each this.packages}} ":{{this.name}}", {{/each}} ] {{else}} if ({{this.cond}}) { build_deps += [ {{#each this.packages}} ":{{this.name}}", {{/each}} ] } {{/if}} {{/each}} {{/if}} {{/unless}} rustenv = [ "CFG_DISABLE_UNSTABLE_FEATURES=0", "STD_ENV_ARCH=$rust_target_arch", ] rustflags = [ "--cfg=backtrace_in_libstd", "-Zforce-unstable-if-unmarked", {{#if extra_kv.no_link_directives}} "-Zlink-directives=false", {{/if}} ] output_dir = "$root_out_dir/local_rustc_sysroot/lib/rustlib/$rust_abi_target/lib/" {{#with extra_kv.raw_gn}} {{this}} {{/with}} {{/with}} } {{/each}}