Repository navigation
Commit 340fd55
committed
Raise the ATen-mode C++ standard where both builds see it
The C++20 flag for ATen-mode targets was set in the interface layer that exists
only for the open source build, whose own docstring says as much. So the internal
build never got it, and the shared wrapper was passing that layer an argument its
internal counterpart does not accept, which would fail there rather than being
merely ineffective.
Move the decision into the shared wrapper, which both builds go through, and leave
the interface layer exactly as it was. The flag goes on the target's own compile
flags, because the build config applies C++17 to everything and only a flag on the
target overrides it.
Test Plan:
Read the two files' own descriptions of themselves to place this: the interface
layer is for changes specific to one build, the wrapper is for logic shared with
the internal one.
Confirmed the internal counterpart takes only the arguments it always took, so the
previous version would have broken it rather than skipped it.
Ran the new helper over the target from the failure and over targets that must not
move. The generated kernel library and the ATen bridge come away with C++20; a
plain library and the portable kernels come away with no flag added, so they keep
the C++17 the build config gives them, which is what the embedded builds rely on.
I cannot run either Buck build here, so CI has to confirm the generated libraries
compile.1 parent 2017627 commit 340fd55
2 files changed
Lines changed: 20 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 163 | + | |
| 164 | + | |
172 | 165 | | |
173 | | - | |
| 166 | + | |
174 | 167 | | |
175 | | - | |
| 168 | + | |
176 | 169 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 170 | + | |
185 | 171 | | |
186 | 172 | | |
187 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
281 | 292 | | |
282 | 293 | | |
283 | 294 | | |
| 295 | + | |
284 | 296 | | |
285 | 297 | | |
286 | 298 | | |
287 | 299 | | |
288 | | - | |
| 300 | + | |
289 | 301 | | |
290 | 302 | | |
291 | 303 | | |
| |||
307 | 319 | | |
308 | 320 | | |
309 | 321 | | |
| 322 | + | |
310 | 323 | | |
311 | | - | |
| 324 | + | |
312 | 325 | | |
313 | 326 | | |
314 | 327 | | |
| |||
0 commit comments