xref: /aosp_15_r20/external/angle/build/rust/tests/test_aliased_deps/BUILD.gn (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1# Copyright 2022 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/rust.gni")
6import("//build/rust/rust_executable.gni")
7import("//build/rust/rust_static_library.gni")
8
9rust_executable("test_aliased_deps_exe") {
10  crate_root = "main.rs"
11  sources = [ crate_root ]
12  deps = [ ":test_aliased_deps" ]
13}
14
15rust_static_library("test_aliased_deps") {
16  crate_root = "lib.rs"
17  sources = [ crate_root ]
18  deps = [ ":real_name" ]
19  aliased_deps = {
20    other_name = ":real_name"
21  }
22  build_native_rust_unit_tests = true
23}
24
25rust_static_library("real_name") {
26  # Using a fixed crate_name here which does not work with `import!` because
27  # we're testing `aliased_deps` which also does not work with `import!`.
28  crate_name = "real_name"
29  crate_root = "real_name.rs"
30  sources = [ crate_root ]
31}
32