
Building bazel yielded errors since commit cd9691d
. The first commit
fixes the build for older bazel versions, the second commit adds new
versions and ports the patches to these versions.
26 lines
980 B
Diff
26 lines
980 B
Diff
diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
|
|
index 361931b..a79129b 100755
|
|
--- a/tools/cpp/unix_cc_configure.bzl
|
|
+++ b/tools/cpp/unix_cc_configure.bzl
|
|
@@ -145,11 +145,19 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, lang_flag, additional_fl
|
|
else:
|
|
inc_dirs = result.stderr[index1 + 1:index2].strip()
|
|
|
|
- return [
|
|
+ default_inc_directories = [
|
|
_prepare_include_path(repository_ctx, _cxx_inc_convert(p))
|
|
for p in inc_dirs.split("\n")
|
|
]
|
|
|
|
+ env = repository_ctx.os.environ
|
|
+ if "SPACK_DEPENDENCIES" in env:
|
|
+ for dep in env["SPACK_DEPENDENCIES"].split(":"):
|
|
+ path = dep + "/include"
|
|
+ default_inc_directories.append(path)
|
|
+
|
|
+ return default_inc_directories
|
|
+
|
|
def _is_compiler_option_supported(repository_ctx, cc, option):
|
|
"""Checks that `option` is supported by the C compiler. Doesn't %-escape the option."""
|
|
result = repository_ctx.execute([
|