Commit 830f4ed
committed
build the bundled onetbb on windows when rtools has no onetbb
Rtools42 ships Intel TBB 2017, and configure adopted it purely on the
presence of a libtbb* archive. Downstream packages then compiled against
those headers, which is not viable: StanHeaders uses
tbb::this_task_arena::isolate unconditionally, TBB 2017 still gates it
behind TBB_PREVIEW_TASK_ISOLATION, and its library doesn't export
isolate_within_arena, so forcing the declaration into view wouldn't link
either. rstan 2.32.7 consequently stopped building on R 4.2 / Windows.
Only adopt the Rtools TBB when it is oneTBB, and otherwise build the
bundled copy from sources, as we already do elsewhere. Rtools42 provides
cmake 3.24.1 in the same directory as gcc, so this needs no new tooling.
It is built as a static library so that RcppParallel.dll takes exactly the
shape it does with an Rtools oneTBB -- oneTBB marks its entry points
__declspec(dllexport) on mingw, so the whole-archive re-export of tbbmalloc
carries over unchanged.
Toolchains that can build neither (e.g. Rtools40, which has no TBB and no
cmake) still fall back to tinythread: a missing or too-old cmake is only an
error off Windows, where the bundled build is the sole option.
Also add CI covering this. R CMD check gains an R 4.2 Windows job, and a new
'downstream' job compiles and loads a translation unit against the flags
RcppParallel advertises, exercising both this_task_arena::isolate and
task_scheduler_observer. R CMD check alone would not have caught the rstan
breakage: RcppParallel installed perfectly well throughout.1 parent 0e0e0c1 commit 830f4ed
4 files changed
Lines changed: 259 additions & 57 deletions
File tree
- .github
- scripts
- workflows
- src
- tools/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
40 | 44 | | |
41 | 45 | | |
42 | 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| |||
374 | 380 | | |
375 | 381 | | |
376 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
377 | 396 | | |
378 | 397 | | |
379 | 398 | | |
| |||
403 | 422 | | |
404 | 423 | | |
405 | 424 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
410 | 432 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | 433 | | |
417 | 434 | | |
418 | 435 | | |
| |||
534 | 551 | | |
535 | 552 | | |
536 | 553 | | |
537 | | - | |
| 554 | + | |
| 555 | + | |
538 | 556 | | |
539 | 557 | | |
540 | 558 | | |
| |||
0 commit comments