模板变量信息

报告问题 查看来源 Nightly · 8.3 · 8.2 · 8.1 · 8.0 · 7.6

封装了模板变量,即可以在 BUILD 文件中通过 $(VARIABLE) 等字符串引用,并由 ctx.expand_make_variables 展开,在内置规则的某些属性中隐式展开。

可以通过调用其同名构造函数来创建 TemplateVariableInfo,并以字符串到字符串的字典作为实参来指定提供的变量。

示例:platform_common.TemplateVariableInfo({'FOO': 'bar'})

成员

variables

dict TemplateVariableInfo.variables

以字典形式返回此目标定义的 make 变量,其中包含字符串键和字符串值