模板变量信息

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

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

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

成员

variables

dict TemplateVariableInfo.variables

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