【发布时间】:2022-11-02 04:13:47
【问题描述】:
我正在尝试对目标使用平台约束:
cc_test(
name = "library_test",
srcs = ["library_test.cc"],
deps = [":library"],
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux"
]
)
但我收到了这个错误:
Dependency chain:
//platforms:library_test (1f7c4b) <-- target platform (@local_config_platform//:host) didn't satisfy constraints [@platforms//cpu:x86_64, @platforms//os:linux]
考虑到这应该是正确的,我觉得这很令人困惑。如何打印 @local_config_platform//:host 中的值是什么?
我确实打开了--incompatible_enable_cc_toolchain_resolution 标志。
【问题讨论】:
标签: bazel