在声明 cc_common.create_cc_toolchain_config_info 和 providecxx_builtin_include_directories
时,我发现需要完全指定包含路径。我只知道 crosstool.bzl 文件中目录的相对路径def _impl(ctx)
,如何才能完全展开呢?例如
def _impl(ctx):
cxx_builtin_include_directories = ["relative/clang/include"]
return cc_common.create_cc_toolchain_config_info(
ctx = ctx,
features = features,
tool_paths = tool_paths,
cxx_builtin_include_directories = cxx_builtin_include_directories,
# ...
)
cc_toolchain_config = rule(
implementation = _impl,
attrs = {},
provides = [CcToolchainConfigInfo],
)
如何将“relative/clang/include”扩展为真实路径?