Skip to content

Commit dcef591

Browse files
committed
fixes
1 parent e6d9a04 commit dcef591

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

foreign_cc/private/resource_sets.bzl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

toolchains/private/ninja_wrapper.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <iostream>
1313
#include <string>
1414
#include <vector>
15+
#include <cerrno>
1516

1617
#ifdef _WIN32
1718
#define WIN32_LEAN_AND_MEAN

0 commit comments

Comments
 (0)