1*d4726bddSHONG Yifanload("@bazel_skylib//:bzl_library.bzl", "bzl_library") 2*d4726bddSHONG Yifanload("//rust/private:rust_analyzer.bzl", "rust_analyzer_detect_sysroot") 3*d4726bddSHONG Yifanload("//rust/private:rustc.bzl", "is_proc_macro_dep", "is_proc_macro_dep_enabled") 4*d4726bddSHONG Yifanload("//rust/private:stamp.bzl", "stamp_build_setting") 5*d4726bddSHONG Yifan 6*d4726bddSHONG Yifanbzl_library( 7*d4726bddSHONG Yifan name = "bzl_lib", 8*d4726bddSHONG Yifan srcs = glob(["**/*.bzl"]), 9*d4726bddSHONG Yifan visibility = ["//rust:__subpackages__"], 10*d4726bddSHONG Yifan deps = ["//rust/platform:bzl_lib"], 11*d4726bddSHONG Yifan) 12*d4726bddSHONG Yifan 13*d4726bddSHONG Yifanstamp_build_setting(name = "stamp") 14*d4726bddSHONG Yifan 15*d4726bddSHONG Yifan# This setting may be used to identify dependencies of proc-macro-s. 16*d4726bddSHONG Yifan# This feature is only enabled if `is_proc_macro_dep_enabled` is true. 17*d4726bddSHONG Yifan# Its value controls the BAZEL_RULES_RUST_IS_PROC_MACRO_DEP environment variable 18*d4726bddSHONG Yifan# made available to the rustc invocation. 19*d4726bddSHONG Yifanis_proc_macro_dep( 20*d4726bddSHONG Yifan name = "is_proc_macro_dep", 21*d4726bddSHONG Yifan build_setting_default = False, 22*d4726bddSHONG Yifan visibility = ["//visibility:public"], 23*d4726bddSHONG Yifan) 24*d4726bddSHONG Yifan 25*d4726bddSHONG Yifan# This setting enables the feature to identify dependencies of proc-macro-s, 26*d4726bddSHONG Yifan# see `is_proc_macro_dep`. 27*d4726bddSHONG Yifanis_proc_macro_dep_enabled( 28*d4726bddSHONG Yifan name = "is_proc_macro_dep_enabled", 29*d4726bddSHONG Yifan build_setting_default = False, 30*d4726bddSHONG Yifan visibility = ["//visibility:public"], 31*d4726bddSHONG Yifan) 32*d4726bddSHONG Yifan 33*d4726bddSHONG Yifanrust_analyzer_detect_sysroot( 34*d4726bddSHONG Yifan name = "rust_analyzer_detect_sysroot", 35*d4726bddSHONG Yifan visibility = ["//visibility:public"], 36*d4726bddSHONG Yifan) 37