Class CxxToolFlags

  • All Implemented Interfaces:
    Direct Known Subclasses:

    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<Arg> getPlatformFlags()
        Flags that precede flags from #getRuleFlags().
      • getRuleFlags

        public abstract<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.