| # Copyright 2019 The Fuchsia 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/testing/environments.gni") |
| |
| if (host_toolchain == current_toolchain) { |
| rustc_binary("bin") { |
| name = "bindc" |
| edition = "2018" |
| deps = [ |
| ":lib", |
| ] |
| } |
| |
| rustc_library("lib") { |
| name = "bindc" |
| edition = "2018" |
| |
| with_unit_tests = true |
| test_environments = [ |
| linux_env, |
| mac_env, |
| ] |
| |
| deps = [ |
| "//third_party/rust_crates:bitfield", |
| ] |
| } |
| } |
| |
| group("bindc") { |
| deps = [ |
| ":bin($host_toolchain)", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":lib_test($host_toolchain)", |
| ] |
| } |