Commit c075ab7
committed
assert one tbb runtime rather than none from the stub
CI disproved the premise of the import assertion added in the previous
commit. On both windows-latest configurations -- the Rtools45 oneTBB and the
bundled build -- the downstream library takes its entire TBB surface (13
tbb::detail::r1:: entry points, including isolate_within_arena and observe)
from tbb.dll, and imports nothing at all from RcppParallel.dll. R CMD SHLIB
links RcppParallel.dll against an export list generated from the package's
own objects, so the TBB entry points pulled out of the static library are
never re-exported; '-ltbb' is therefore load-bearing, not a fallback.
So assert the invariant that does hold and does matter: the TBB surface must
come from exactly one module. A library split across RcppParallel.dll and the
stub would register observers with one scheduler while its tasks ran in the
other, which is silent, unlike the link error this replaced.
Two further defects in the check itself:
- an objdump that cannot read the file exited non-zero having printed no
import table, which parsed as 'no imports' and passed vacuously. This is
what made the windows-11-arm job green: Sys.which() finds the runner's
x86_64 objdump, which cannot read an aarch64 PE.
- the export table follows the import tables and lists the library's own
inlined tbb::detail::d1:: instantiations. Left in, it was absorbed into the
last 'DLL Name:' block and credited that library with TBB imports it never
had -- harmless only because tbb.dll happened to be listed last.
Also correct the tbbLdFlags() comment, which described RcppParallel.dll as
re-exporting an incidental part of the runtime.1 parent 05db507 commit c075ab7
2 files changed
Lines changed: 67 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
109 | 130 | | |
110 | 131 | | |
111 | 132 | | |
112 | 133 | | |
113 | | - | |
| 134 | + | |
114 | 135 | | |
115 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
116 | 142 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 143 | + | |
122 | 144 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
129 | 154 | | |
130 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
131 | 166 | | |
132 | 167 | | |
133 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
| |||
0 commit comments