20 lines
822 B
Diff
20 lines
822 B
Diff
diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
|
|
index 5feb10b76a..cde0b8f8f1 100644
|
|
--- a/tools/cpp/unix_cc_configure.bzl
|
|
+++ b/tools/cpp/unix_cc_configure.bzl
|
|
@@ -151,8 +151,14 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, lang_flag, additional_fl
|
|
).stdout.strip() + "/share"
|
|
inc_directories.append(_prepare_include_path(repository_ctx, resource_dir))
|
|
|
|
+ env = repository_ctx.os.environ
|
|
+ if "SPACK_INCLUDE_DIRS" in env:
|
|
+ for path in env["SPACK_INCLUDE_DIRS"].split(":"):
|
|
+ inc_directories.append(path)
|
|
+
|
|
return 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([
|