Commit 88ca3c0
committed
Bug 1943149 - build(swgl): work around broken (upstream)
In upstream, a new heuristic for detecting compiler families in
`cc::Tool` was introduced. The heuristic we originally patched upstream
is now the fallback heuristic, and does not get used for our `clang`
compiler. This causes our interaction with default flags and
`cc::Tool::is_like_msvc` to be incorrect in `swgl`, since `clang`'s CLI
to use `cl`-like arguments, and rejects `clang`-like arguments.
Work around this by detecting checking `Tool`s' base command and
"wrapper arguments" to see if we're (1) using `clang` and (2) we have
a wrapper argument matching `--driver-mode=cl`. If so, provide `cl`-like
arguments in `swgl`, rather than `clang`-like arguments.cc::Tool detection of clang --driver-mode=cl r=#gfx-reviewers1 parent ae658df commit 88ca3c0
1 file changed
+20
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
0 commit comments