Feature configuration: add a field required_variables on flag_sets.

This allows to prevent expansion of flag sets based on whether build variables
are available. If required_variables is not set, and a variable that is
referenced in the flag_set's flags is not available, the build will fail.

We need the new behavior when some input files (for example profile data in
FDO enabled builds) are only available for a subset of the translation units of
a given target.

RELNOTES: None.
PiperOrigin-RevId: 100028996
This commit is contained in:
klimek 2015-08-06 16:38:16 +02:00 committed by Marcel Hlopko
parent 7918071584
commit 8b16e7c25e
1 changed files with 10 additions and 0 deletions

View File

@ -109,6 +109,16 @@ message CToolchain {
// If 'with_feature' is omitted, the flag set will be applied // If 'with_feature' is omitted, the flag set will be applied
// unconditionally for every action specified. // unconditionally for every action specified.
repeated FeatureSet with_feature = 3; repeated FeatureSet with_feature = 3;
// A list of build variables that this feature set needs, but which are
// allowed to not be set. If any of the build variables listed is not
// set, the feature set will not be expanded.
//
// NOTE: Consider alternatives before using this; usually tools should
// consistently create the same set of files, even if empty; use this
// only for backwards compatibility with already existing behavior in tools
// that are currently not worth changing.
repeated string expand_if_all_available = 4;
} }
// Contains all flag specifications for one feature. // Contains all flag specifications for one feature.