Source code
Revision control
Copy as Markdown
Other Tools
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chromium/build/config/rust.gni")
import("//chromium/build/rust/rust_executable.gni")
import("//chromium/build/rust/rust_static_library.gni")
rust_executable("test_aliased_deps_exe") {
crate_root = "main.rs"
sources = [ crate_root ]
deps = [ ":test_aliased_deps" ]
}
rust_static_library("test_aliased_deps") {
crate_root = "lib.rs"
sources = [ crate_root ]
deps = [ ":real_name" ]
aliased_deps = {
other_name = ":real_name"
}
build_native_rust_unit_tests = true
}
rust_static_library("real_name") {
# Using a fixed crate_name here which does not work with `import!` because
# we're testing `aliased_deps` which also does not work with `import!`.
crate_name = "real_name"
crate_root = "real_name.rs"
sources = [ crate_root ]
}