summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/bazel/cc_configure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/bazel/cc_configure.patch')
-rw-r--r--var/spack/repos/builtin/packages/bazel/cc_configure.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bazel/cc_configure.patch b/var/spack/repos/builtin/packages/bazel/cc_configure.patch
new file mode 100644
index 0000000000..3e108c3b5e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/cc_configure.patch
@@ -0,0 +1,28 @@
+--- bazel-0.3.1/tools/cpp/cc_configure.bzl 2016-10-13 14:00:32.118358387 +0200
++++ bazel-0.3.1/tools/cpp/cc_configure.bzl 2016-10-13 13:52:45.342610147 +0200
+@@ -173,8 +173,23 @@
+ else:
+ inc_dirs = result.stderr[index1 + 1:index2].strip()
+
+- return [repository_ctx.path(_cxx_inc_convert(p))
+- for p in inc_dirs.split("\n")]
++ default_inc_directories = [
++ repository_ctx.path(_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"
++ # path = repository_ctx.os.path.join(dep, "include")
++ # if not repository_ctx.os.path.exists(path):
++ # continue
++ default_inc_directories.append(
++ repository_ctx.path(_cxx_inc_convert(path))
++ )
++
++ return default_inc_directories
+
+ def _add_option_if_supported(repository_ctx, cc, option):
+ """Checks that `option` is supported by the C compiler."""