Repository navigation
Commit 6627a2d
committed
Decide ATen mode before the wrapper consumes the dependency list
The Buck build still failed compiling generated sources that include ATen:
ATen/core/TensorBase.h:1031:5: error: unknown type name 'requires'
The check for "is this an ATen target" reads the external dependency list, but by
the time it ran, an earlier step in the same wrapper had already removed that list
after turning its entries into real dependencies. So every target looked like a
non-ATen one, no target was ever raised to C++20, and the flag added for it was
never added at all.
Read the list first, then let the rest of the wrapper consume it.
Test Plan:
Traced the order in the wrapper: the step that removes the list runs before the
step that read it. Reproduced that by running both against the target from the
failure: it reports ATen mode with the list present and not once it is gone, which
is exactly the sequence the wrapper produced.
Reran the whole path in the new order over the target from the failure, an ATen
target that exports its dependency instead of naming it directly, and a plain
library. The first two now come away at C++20 and the plain one is untouched, so
the embedded builds keep the C++17 they rely on.
Also read the build system's own source to confirm the flag can win where it is
placed: a target's flags are appended after the toolchain's, and its comment says
they are last on purpose. So the earlier concern that the flag was being placed
somewhere that could not take effect was unfounded; it simply was not being added.
Shortened an overlong comment that failed the formatter.
I cannot run this Buck build here, so CI has to confirm the generated libraries
compile.1 parent 340fd55 commit 6627a2d
2 files changed
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
281 | | - | |
| 280 | + | |
282 | 281 | | |
283 | 282 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 283 | + | |
287 | 284 | | |
288 | | - | |
| 285 | + | |
289 | 286 | | |
290 | 287 | | |
291 | 288 | | |
292 | 289 | | |
| 290 | + | |
| 291 | + | |
293 | 292 | | |
294 | 293 | | |
295 | | - | |
| 294 | + | |
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
| |||
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
| 319 | + | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | | - | |
| 323 | + | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
| |||
0 commit comments