Class CxxToolFlags

  • All Implemented Interfaces:
    AddsToRuleKey
    Direct Known Subclasses:
    ExplicitCxxToolFlags

    public abstract class CxxToolFlags
    extends Object
    implements AddsToRuleKey
    Tracks flags passed to the preprocessor or compiler.

    Flags derived from the "platform" are differentiated from flags derived from the "rule" to allow for rule flags to override platform flags. This is particularly important when the platform and rule flags from different sources are merged together.

    Users should use the API in this class instead of the concrete implementations.

    • Constructor Detail

      • CxxToolFlags

        public CxxToolFlags()
    • Method Detail

      • getPlatformFlags

        public abstract com.google.common.collect.ImmutableList<Arg> getPlatformFlags()
        Flags that precede flags from #getRuleFlags().
      • getRuleFlags

        public abstract com.google.common.collect.ImmutableList<Arg> getRuleFlags()
        Flags that succeed flags from #getPlatformFlags().
      • getAllFlags

        public final Iterable<Arg> getAllFlags()
        Returns all flags in the appropriate order.
      • of

        public static CxxToolFlags of()
        Returns the empty lists of flags.
      • concat

        public static CxxToolFlags concat​(CxxToolFlags... parts)
        Concatenate multiple flags in a pairwise manner.