我在 BUILD 文件中定义了以下别名:
alias(
name = "platform",
actual = select({
":macos_x86_64": "macos_x86_64",
":linux_x86_64": "linux_x86_64",
":linux_aarch64": "linux_aarch64",
}),
visibility = ["//visibility:public"],
)
如何将“实际”字符串传递给这样的函数?
def myFunction(platform): ...
我正在尝试最天真的事情,它不明白它是别名,而不是字符串:
myFunction("//bazel/config:platform")