blob: 45ad73f44d3a6fc580adf71d0a52667d2e2cab54 [file] [log] [blame]
# 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("//build/config/rust.gni")
import("//build/rust/rust_executable.gni")
import("//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 = {
# Unfortunately we have to know the `__rlib` suffix which is attached to the
# actual rlib in `rust_static_library()`.
other_name = ":real_name__rlib"
}
build_native_rust_unit_tests = true
}
rust_static_library("real_name") {
crate_root = "real_name.rs"
sources = [ crate_root ]
}