1*d4726bddSHONG Yifanload("//rust:defs.bzl", "rust_binary", "rust_test") 2*d4726bddSHONG Yifan 3*d4726bddSHONG Yifanpackage(default_visibility = ["//visibility:public"]) 4*d4726bddSHONG Yifan 5*d4726bddSHONG Yifanrust_binary( 6*d4726bddSHONG Yifan name = "versioned_dylib", 7*d4726bddSHONG Yifan srcs = [ 8*d4726bddSHONG Yifan "src/main.rs", 9*d4726bddSHONG Yifan ], 10*d4726bddSHONG Yifan edition = "2018", 11*d4726bddSHONG Yifan target_compatible_with = select({ 12*d4726bddSHONG Yifan "@platforms//os:linux": [], 13*d4726bddSHONG Yifan "//conditions:default": ["@platforms//:incompatible"], 14*d4726bddSHONG Yifan }), 15*d4726bddSHONG Yifan deps = [ 16*d4726bddSHONG Yifan "//test/versioned_dylib/c:libreturn_zero", 17*d4726bddSHONG Yifan "@libc", 18*d4726bddSHONG Yifan ], 19*d4726bddSHONG Yifan) 20*d4726bddSHONG Yifan 21*d4726bddSHONG Yifanrust_test( 22*d4726bddSHONG Yifan name = "versioned_dylib_test", 23*d4726bddSHONG Yifan crate = "versioned_dylib", 24*d4726bddSHONG Yifan edition = "2018", 25*d4726bddSHONG Yifan target_compatible_with = select({ 26*d4726bddSHONG Yifan "@platforms//os:linux": [], 27*d4726bddSHONG Yifan "//conditions:default": ["@platforms//:incompatible"], 28*d4726bddSHONG Yifan }), 29*d4726bddSHONG Yifan) 30