
* use bazel commit in #13112, and add version 0.24.1, and corresponding cc_env patch * undo preferred java version by dodo47 * patch for v0.26 * Update install steps * Add patches for more versions * Add unit tests * Update patches for new Spack env vars * env is already defined, use spackEnv
23 lines
760 B
Diff
23 lines
760 B
Diff
--- a/tools/cpp/unix_cc_configure.bzl
|
|
+++ b/tools/cpp/unix_cc_configure.bzl
|
|
@@ -147,9 +147,18 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, additional_flags = []):
|
|
else:
|
|
inc_dirs = result.stderr[index1 + 1:index2].strip()
|
|
|
|
- return [_prepare_include_path(repository_ctx, _cxx_inc_convert(p))
|
|
- for p in inc_dirs.split("\n")]
|
|
+ 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_INCLUDE_DIRS" in env:
|
|
+ for path in env["SPACK_INCLUDE_DIRS"].split(":"):
|
|
+ default_inc_directories.append(path)
|
|
+
|
|
+ return default_inc_directories
|
|
|
|
|
|
def _is_option_supported(repository_ctx, cc, option):
|