• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    # Unfortunately we have to know the `__rlib` suffix which is attached to the
21    # actual rlib in `rust_static_library()`.
22    other_name = ":real_name__rlib"
23  }
24  build_native_rust_unit_tests = true
25}
26
27rust_static_library("real_name") {
28  crate_root = "real_name.rs"
29  sources = [ crate_root ]
30}
31