| # 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| group("rust_static_linking") { |
| testonly = true |
| public_deps = [ |
| ":lib", |
| ":static", |
| ":tests", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":static_linking_tests" ] |
| } |
| |
| rustc_library("lib") { |
| name = "static_linking" |
| with_unit_tests = true |
| version = "0.1.0" |
| edition = "2018" |
| non_rust_deps = [ ":static" ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| static_library("static") { |
| sources = [ "static.c" ] |
| } |
| |
| fuchsia_unittest_package("static_linking_tests") { |
| deps = [ ":lib_test" ] |
| } |