Documentation ¶
Index ¶
- type Consumer
- type Flag
- func FromDefineOwned(raw string, owner blueprint.Module, tag Type) Flag
- func FromGeneratedIncludePath(path string, owner blueprint.Module, tag Type) Flag
- func FromIncludePath(path string, tag Type) Flag
- func FromIncludePathOwned(path string, owner blueprint.Module, tag Type) Flag
- func FromString(raw string, tag Type) Flag
- func FromStringOwned(raw string, owner blueprint.Module, tag Type) Flag
- type FlagParserTable
- type FlagParserTableEntry
- type Flags
- func (fs Flags) AppendIfUnique(f Flag) Flags
- func (fs Flags) Contains(query Flag) bool
- func (fs Flags) Filtered(predicate func(Flag) bool) (ret Flags)
- func (fs Flags) ForEach(functor func(Flag))
- func (fs Flags) ForEachIf(predicate func(Flag) bool, functor func(Flag))
- func (fs Flags) GroupByType(mask Type) (out Flags)
- func (fs Flags) Iterate() <-chan Flag
- func (fs Flags) IteratePredicate(predicate func(Flag) bool) <-chan Flag
- func (fs Flags) Merge(other Flags) Flags
- func (fs Flags) ToStringSlice() (ret []string)
- type Provider
- type ReExporter
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer interface { // Returns flags consumed by this module, listed by itself FlagsIn() Flags // Returns flags consumed by this module, including any flags provided by its upstream providers. FlagsInTransitive(blueprint.BaseModuleContext) Flags }
type Flag ¶
type Flag struct {
// contains filtered or unexported fields
}
func FromIncludePath ¶
func FromIncludePathOwned ¶
func FromString ¶
func (Flag) IsType ¶
Checks if flag matches the given mask exactly. Returns true if all the tags match.
func (Flag) MatchesType ¶
Check if a flag loosely matches the given type. This will return true if at least one of the tags matches.
type FlagParserTable ¶
type FlagParserTable []FlagParserTableEntry
type FlagParserTableEntry ¶
type Flags ¶
type Flags []Flag
Array of files as a helper for struct attribute collections TODO: add the possibility to tag a group of files.
func ParseFromProperties ¶
func ParseFromProperties(owner blueprint.Module, luts FlagParserTable, s interface{}) (ret Flags)
Helper method to scrape many properties from a module struct.
func ReferenceFlagsInTransitive ¶
func ReferenceFlagsInTransitive(ctx blueprint.BaseModuleContext) (ret Flags)
Basic common implementation, certain targets may wish to customize this.
func (Flags) AppendIfUnique ¶
func (Flags) GroupByType ¶
Sorts the given collection by it's type masked by given mask. For example if mask is flag.TypeCC | flag.TypeInclude, the buckets would be: TypeUnset TypeCC TypeInclude TypeCC | TypeInclude
func (Flags) IteratePredicate ¶
func (Flags) ToStringSlice ¶
type Provider ¶
type Provider interface { // Returns flags provided by this module to any consumer. FlagsOut() Flags }
type ReExporter ¶
type Type ¶
type Type uint32
const ( // Flag types TypeUnset Type = 0 TypeAsm Type = 1 << iota TypeC TypeCpp TypeCC TypeLinker TypeTransitiveLinker // Only for strict targets to comply with Bazel TypeLinkLibrary TypeInclude TypeIncludeLocal // Helper flag to mark local include dirs TypeIncludeGenerated TypeIncludeSystem TypeExported // Applied to direct downstream dep **only** TypeTransitive // Masks TypeCompilable = TypeAsm | TypeC | TypeCpp )
Flags have an associated contextual information which is useful to filter based on use. TypeConly does not exist as it is equivalent to ((type & TypeCompilable) == TypeC)