xref: /aosp_15_r20/external/bazelbuild-rules_rust/test/transitive_lib/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanload("//cargo:defs.bzl", "cargo_build_script")
2*d4726bddSHONG Yifanload("//rust:defs.bzl", "rust_binary", "rust_library")
3*d4726bddSHONG Yifan
4*d4726bddSHONG Yifan# sets link alias
5*d4726bddSHONG Yifancargo_build_script(
6*d4726bddSHONG Yifan    name = "buildscript",
7*d4726bddSHONG Yifan    srcs = ["build.rs"],
8*d4726bddSHONG Yifan    crate_root = "build.rs",
9*d4726bddSHONG Yifan    edition = "2018",
10*d4726bddSHONG Yifan)
11*d4726bddSHONG Yifan
12*d4726bddSHONG Yifan# links to a symbol in shell32
13*d4726bddSHONG Yifanrust_library(
14*d4726bddSHONG Yifan    name = "dll_user",
15*d4726bddSHONG Yifan    srcs = ["dll_user.rs"],
16*d4726bddSHONG Yifan    edition = "2018",
17*d4726bddSHONG Yifan    deps = [
18*d4726bddSHONG Yifan        ":buildscript",
19*d4726bddSHONG Yifan    ],
20*d4726bddSHONG Yifan)
21*d4726bddSHONG Yifan
22*d4726bddSHONG Yifan# does not link to any symbol in shell32
23*d4726bddSHONG Yifanrust_binary(
24*d4726bddSHONG Yifan    name = "dll_user_user",
25*d4726bddSHONG Yifan    srcs = ["dll_user_user.rs"],
26*d4726bddSHONG Yifan    edition = "2018",
27*d4726bddSHONG Yifan    deps = [
28*d4726bddSHONG Yifan        ":dll_user",
29*d4726bddSHONG Yifan    ],
30*d4726bddSHONG Yifan)
31