diff options
author | Johann Klähn <github@web.jklaehn.de> | 2017-12-11 19:34:06 +0100 |
---|---|---|
committer | scheibelp <scheibel1@llnl.gov> | 2017-12-11 10:34:06 -0800 |
commit | e83c3d1b6a8f25cfc4623edd98c24a54b0e064d1 (patch) | |
tree | e66a0ecb2a04dea2e4f7450c70c389b15f336dd9 | |
parent | 53b2ec356bef25150b51e062e66f9cb4f245fad9 (diff) | |
download | spack-e83c3d1b6a8f25cfc4623edd98c24a54b0e064d1.tar.gz spack-e83c3d1b6a8f25cfc4623edd98c24a54b0e064d1.tar.bz2 spack-e83c3d1b6a8f25cfc4623edd98c24a54b0e064d1.tar.xz spack-e83c3d1b6a8f25cfc4623edd98c24a54b0e064d1.zip |
bazel: include SPACK_DEBUG_LOG_ID in environment (#6562)
Fixes #6521.
Bazel's build system filters environment variables, including those
set by Spack for use by its compiler wrapper. This updates the patch
to include the SPACK_DEBUG_LOG_ID variable added in #5837.
-rw-r--r-- | var/spack/repos/builtin/packages/bazel/fix_env_handling.patch | 7 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/bazel/link.patch | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch b/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch index 9be9f97d69..14deccf950 100644 --- a/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch +++ b/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch @@ -1,7 +1,7 @@ diff -pu bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java --- bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java 2016-09-14 11:56:01.565756979 +0200 +++ bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java 2016-09-14 12:04:13.292839801 +0200 -@@ -92,5 +92,115 @@ public class BazelConfiguration extends +@@ -92,5 +92,120 @@ public class BazelConfiguration extends if (tmpdir != null) { builder.put("TMPDIR", tmpdir); } @@ -16,6 +16,11 @@ diff -pu bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/Baz + builder.put("SPACK_ENV_PATH", spack_env_path); + } + ++ String spack_debug_log_id = System.getenv("SPACK_DEBUG_LOG_ID"); ++ if (spack_debug_log_id != null) { ++ builder.put("SPACK_DEBUG_LOG_ID", spack_debug_log_id); ++ } ++ + String spack_debug_log_dir = System.getenv("SPACK_DEBUG_LOG_DIR"); + if (spack_debug_log_dir != null) { + builder.put("SPACK_DEBUG_LOG_DIR", spack_debug_log_dir); diff --git a/var/spack/repos/builtin/packages/bazel/link.patch b/var/spack/repos/builtin/packages/bazel/link.patch index 69d100f62c..5c8824b87d 100644 --- a/var/spack/repos/builtin/packages/bazel/link.patch +++ b/var/spack/repos/builtin/packages/bazel/link.patch @@ -1,6 +1,6 @@ --- bazel-0.3.1/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java 2016-07-29 10:22:16.000000000 +0200 +++ bazel-0.3.1/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java 2016-10-13 15:21:35.036617890 +0200 -@@ -214,6 +214,130 @@ +@@ -214,6 +214,135 @@ .getParentDirectory() .getPathString()); } @@ -28,6 +28,11 @@ + result.put("SPACK_ENV_PATH", spack_env_path); + } + ++ String spack_debug_log_id = System.getenv("SPACK_DEBUG_LOG_ID"); ++ if (spack_debug_log_id != null) { ++ result.put("SPACK_DEBUG_LOG_ID", spack_debug_log_id); ++ } ++ + String spack_debug_log_dir = System.getenv("SPACK_DEBUG_LOG_DIR"); + if (spack_debug_log_dir != null) { + result.put("SPACK_DEBUG_LOG_DIR", spack_debug_log_dir); |