summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/bazel/link.patch
blob: 5c8824b87d88189b16dac8e1e71c393a71699737 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
--- 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,135 @@
               .getParentDirectory()
               .getPathString());
     }
+
+    String path = System.getenv("PATH");
+    result.put("PATH", path == null ? "/bin:/usr/bin" : path);
+
+    String ldLibraryPath = System.getenv("LD_LIBRARY_PATH");
+    if (ldLibraryPath != null) {
+      result.put("LD_LIBRARY_PATH", ldLibraryPath);
+    }
+
+    String tmpdir = System.getenv("TMPDIR");
+    if (tmpdir != null) {
+      result.put("TMPDIR", tmpdir);
+    }
+
+    String spack_prefix = System.getenv("SPACK_PREFIX");
+    if (spack_prefix != null) {
+      result.put("SPACK_PREFIX", spack_prefix);
+    }
+
+    String spack_env_path = System.getenv("SPACK_ENV_PATH");
+    if (spack_env_path != null) {
+      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);
+    }
+
+    String spack_compiler_spec = System.getenv("SPACK_COMPILER_SPEC");
+    if (spack_compiler_spec != null) {
+      result.put("SPACK_COMPILER_SPEC", spack_compiler_spec);
+    }
+
+    String spack_cc_rpath_arg = System.getenv("SPACK_CC_RPATH_ARG");
+    if (spack_cc_rpath_arg != null) {
+      result.put("SPACK_CC_RPATH_ARG", spack_cc_rpath_arg);
+    }
+
+    String spack_cxx_rpath_arg = System.getenv("SPACK_CXX_RPATH_ARG");
+    if (spack_cxx_rpath_arg != null) {
+      result.put("SPACK_CXX_RPATH_ARG", spack_cxx_rpath_arg);
+    }
+
+    String spack_f77_rpath_arg = System.getenv("SPACK_F77_RPATH_ARG");
+    if (spack_f77_rpath_arg != null) {
+      result.put("SPACK_F77_RPATH_ARG", spack_f77_rpath_arg);
+    }
+
+    String spack_fc_rpath_arg = System.getenv("SPACK_FC_RPATH_ARG");
+    if (spack_fc_rpath_arg != null) {
+      result.put("SPACK_FC_RPATH_ARG", spack_fc_rpath_arg);
+    }
+
+    String spack_short_spec = System.getenv("SPACK_SHORT_SPEC");
+    if (spack_short_spec != null) {
+      result.put("SPACK_SHORT_SPEC", spack_short_spec);
+    }
+
+    String spack_cc = System.getenv("SPACK_CC");
+    if (spack_cc != null) {
+      result.put("SPACK_CC", spack_cc);
+    }
+
+    String spack_cxx = System.getenv("SPACK_CXX");
+    if (spack_cxx != null) {
+      result.put("SPACK_CXX", spack_cxx);
+    }
+
+    String spack_f77 = System.getenv("SPACK_F77");
+    if (spack_f77 != null) {
+      result.put("SPACK_F77", spack_f77);
+    }
+
+    String spack_fc = System.getenv("SPACK_FC");
+    if (spack_fc != null) {
+      result.put("SPACK_FC", spack_fc);
+    }
+
+    String spack_cflags = System.getenv("SPACK_CFLAGS");
+    if (spack_cflags != null) {
+      result.put("SPACK_CFLAGS", spack_cflags);
+    }
+
+    String spack_cxxflags = System.getenv("SPACK_CXXFLAGS");
+    if (spack_cxxflags != null) {
+      result.put("SPACK_CXXFLAGS", spack_cxxflags);
+    }
+
+    String spack_fcflags = System.getenv("SPACK_FCFLAGS");
+    if (spack_fcflags != null) {
+      result.put("SPACK_FCFLAGS", spack_fcflags);
+    }
+
+    String spack_fflags = System.getenv("SPACK_FFLAGS");
+    if (spack_fflags != null) {
+      result.put("SPACK_FFLAGS", spack_fflags);
+    }
+
+    String spack_ldflags = System.getenv("SPACK_LDFLAGS");
+    if (spack_ldflags != null) {
+      result.put("SPACK_LDFLAGS", spack_ldflags);
+    }
+
+    String spack_ldlibs = System.getenv("SPACK_LDLIBS");
+    if (spack_ldlibs != null) {
+      result.put("SPACK_LDLIBS", spack_ldlibs);
+    }
+
+    String spack_debug = System.getenv("SPACK_DEBUG");
+    if (spack_debug != null) {
+      result.put("SPACK_DEBUG", spack_debug);
+    }
+
+    String spack_test_command = System.getenv("SPACK_TEST_COMMAND");
+    if (spack_test_command != null) {
+      result.put("SPACK_TEST_COMMAND", spack_test_command);
+    }
+
+    String spack_dependencies = System.getenv("SPACK_DEPENDENCIES");
+    if (spack_dependencies != null) {
+      result.put("SPACK_DEPENDENCIES", spack_dependencies);
+    }
+
     return result.build();
   }