@@ -102,16 +102,19 @@ SIZE_ATTRIBUTES = {
102102 values = _SIZES .keys () + [_DEFAULT_SIZE ],
103103 default = _DEFAULT_SIZE ,
104104 mandatory = False ,
105- doc = (
106- "Set the approximate size of this build. This does two things:" +
107- "1. Sets the environment variables to tell the underlying build system " +
108- " the requested parallelization; examples are CMAKE_BUILD_PARALLEL_LEVEL " +
109- " for cmake or MAKEFLAGS for autotools. " +
110- "2. Sets the resource_set attribute on the action to tell bazel how many cores " +
111- " are being used, so it schedules appropriately." +
112- "The sizes map to labels, which can be used to override the meaning of the sizes. See " +
113- "@rules_foreign_cc//foreign_cc/settings:size_{size}_{cpu|mem}"
114- ),
105+ doc = """\
106+ Set the approximate size of this build. This does two things:
107+ 1. Sets the environment variables to tell the underlying build system the
108+ requested parallelization; examples are CMAKE_BUILD_PARALLEL_LEVEL for cmake
109+ or MAKEFLAGS for autotools.
110+ 2. Sets the resource_set attribute on the action to tell bazel how many cores
111+ are being used, so it schedules appropriately. The sizes map to labels,
112+ which can be used to override the meaning of the sizes. See
113+ @rules_foreign_cc//foreign_cc/settings:size_{size}_{cpu|mem}.
114+
115+ Running `bazel run @rules_foreign_cc//foreign_cc/settings` will print out all
116+ the settings in bazelrc format for easy customization.
117+ """ ,
115118 ),
116119} | {
117120 _setting (size = size , resource = resource , mode = "key" ): attr .label (
@@ -132,7 +135,7 @@ def _get_size_config(attr, size, resource):
132135 s = getattr (attr , name , None )
133136
134137 if s == None :
135- fail ("unknown size: " , size )
138+ fail ("unknown size:" , size )
136139
137140 return s [BuildSettingInfo ].value
138141
0 commit comments